step 4 : listing data rekaman audio

This commit is contained in:
sindhu
2025-02-21 11:57:15 +07:00
parent 77b7a133e4
commit 4db558ab68
9 changed files with 578 additions and 13 deletions

View File

@@ -33,8 +33,6 @@ class LoginScreen extends HookConsumerWidget {
final isLoading = useState(false);
final isSuccess = useState(false);
ToastificationItem? toastItem;
void showLongToast(
String title,
String message,
@@ -42,7 +40,7 @@ class LoginScreen extends HookConsumerWidget {
Duration waktu,
) {
if (typeToast == "success") {
toastItem = toastification.show(
toastification.show(
context: context,
title: Text(title),
description: Text(message),
@@ -50,7 +48,7 @@ class LoginScreen extends HookConsumerWidget {
type: ToastificationType.success,
);
} else if (typeToast == "error") {
toastItem = toastification.show(
toastification.show(
context: context,
title: Text(title),
description: Text(message),
@@ -61,12 +59,6 @@ class LoginScreen extends HookConsumerWidget {
}
}
void hideToast() {
if (toastItem != null) {
toastification.dismissAll();
}
}
// proses login
ref.listen(loginProvider, (prev, next) {
if (next is LoginStateLoading) {
@@ -81,7 +73,6 @@ class LoginScreen extends HookConsumerWidget {
Duration(seconds: 3),
);
} else if (next is LoginStateDone) {
hideToast();
isLoading.value = false;
isSuccess.value = true;
ref.read(currentUserProvider.notifier).state = next.model;