View accessibility.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Button | |
android:id="@+id/confirm_button" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:layout_marginHorizontal="@dimen/margin_medium" | |
android:background="@drawable/primary_button" | |
android:importantForAccessibility="yes" | |
android:text="Confirm" | |
android:contentDescription="Confirm button, double tap to confirm"/> |
View product_details.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"screen_elements": { | |
"header_text": { | |
"display": "Product details", | |
"accessibility": "Product details, header" | |
}, | |
"back_button": { | |
"display": "Back button", | |
"accessibility": "Back button, double tap to navigate to previous screen" | |
}, |
View DeepLinkHandlerActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AndroidEntryPoint | |
class DeepLinkHandlerActivity : ComponentActivity() { | |
@Inject | |
lateinit var supabaseClient: SupabaseClient | |
private lateinit var callback: (String, String) -> Unit | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) |
View AndroidManifest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:name=".ManageProductApplication" | |
android:allowBackup="true" | |
android:dataExtractionRules="@xml/data_extraction_rules" | |
android:enableOnBackInvokedCallback="true" | |
android:fullBackupContent="@xml/backup_rules" |
View SignInScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class) | |
@Composable | |
fun SignInScreen( | |
modifier: Modifier = Modifier, | |
navController: NavController, | |
viewModel: SignInViewModel = hiltViewModel() | |
) { | |
val snackBarHostState = remember { SnackbarHostState() } | |
val coroutineScope = rememberCoroutineScope() | |
Scaffold( |
View SignInViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@HiltViewModel | |
class SignInViewModel @Inject constructor( | |
private val authenticationRepository: AuthenticationRepository | |
) : ViewModel() { | |
private val _email = MutableStateFlow("") | |
val email: Flow<String> = _email | |
private val _password = MutableStateFlow("") | |
val password = _password |
View SignUpScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SignUpScreen( | |
modifier: Modifier = Modifier, | |
navController: NavController, | |
viewModel: SignUpViewModel = hiltViewModel() | |
) { | |
val snackBarHostState = remember { SnackbarHostState() } | |
val coroutineScope = rememberCoroutineScope() | |
Scaffold( | |
snackbarHost = { androidx.compose.material.SnackbarHost(snackBarHostState) }, |
View SignUpViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@HiltViewModel | |
class SignUpViewModel @Inject constructor( | |
private val authenticationRepository: AuthenticationRepository | |
) : ViewModel() { | |
private val _email = MutableStateFlow("") | |
val email: Flow<String> = _email | |
private val _password = MutableStateFlow("") | |
val password = _password |
View AddProductViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@HiltViewModel | |
class AddProductViewModel @Inject constructor( | |
private val productRepository: ProductRepository, | |
) : ViewModel() { | |
private val _isLoading = MutableStateFlow(false) | |
val isLoading: Flow<Boolean> = _isLoading | |
private val _showSuccessMessage = MutableStateFlow(false) | |
val showSuccessMessage: Flow<Boolean> = _showSuccessMessage |
View AddProductScreen.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") | |
@OptIn(ExperimentalMaterial3Api::class) | |
@Composable | |
fun AddProductScreen( | |
modifier: Modifier = Modifier, | |
navController: NavController, | |
viewModel: AddProductViewModel = hiltViewModel(), | |
) { | |
Scaffold( | |
topBar = { |
NewerOlder