← back to deanwenchen__ShoppeAndroidTwo

Function bodies 4 total

All specs Real LLM only Function bodies
ExampleInstrumentedTest class · kotlin · L17-L24 (8 LOC)
app/src/androidTest/java/com/shoppe/android/ExampleInstrumentedTest.kt
class ExampleInstrumentedTest {
    @Test
    fun useAppContext() {
        // Context of the app under test.
        val appContext = InstrumentationRegistry.getInstrumentation().targetContext
        assertEquals("com.shoppe.android", appContext.packageName)
    }
}
MainActivity class · kotlin · L27-L130 (104 LOC)
app/src/main/java/com/shoppe/android/MainActivity.kt
class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        enableEdgeToEdge()

        // Set transparent status bar
        WindowCompat.setDecorFitsSystemWindows(window, false)

        setContent {
            ShoppeAndroidTwoTheme {
                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    val navController = rememberNavController()

                    NavHost(
                        navController = navController,
                        startDestination = Screen.Start.route
                    ) {
                        composable(Screen.Start.route) {
                            StartPage(
                                onNavigateToCreateAccount = {
                                    navController.navigate(Screen.CreateAccount.route)
                          
Screen class · kotlin · L3-L16 (14 LOC)
app/src/main/java/com/shoppe/android/navigation/Screen.kt
sealed class Screen(val route: String) {
    object Start : Screen("start")
    object CreateAccount : Screen("create_account")
    object Login : Screen("login")
    object Password : Screen("password")
    object PasswordRecovery : Screen("password_recovery")
    object PasswordRecoveryCode : Screen("password_recovery_code")
    object NewPassword : Screen("new_password")
    object HelloCard : Screen("hello_card")
    object Shop : Screen("shop")
    object ProductDetail : Screen("product/{productId}") {
        fun createRoute(productId: String) = "product/$productId"
    }
}
ProductDetail class · kotlin · L13-L15 (3 LOC)
app/src/main/java/com/shoppe/android/navigation/Screen.kt
    object ProductDetail : Screen("product/{productId}") {
        fun createRoute(productId: String) = "product/$productId"
    }