update sound when receive from FCM in foreground, background and terminate

This commit is contained in:
anhtunz
2025-03-07 16:44:55 +07:00
parent 314e32eaa9
commit a6fa3b1572
12 changed files with 185 additions and 67 deletions

View File

@@ -192,6 +192,8 @@ class _LoginScreenState extends State<LoginScreen> {
LocaleManager.instance
.setString(PreferencesKeys.ROLE, loginModel.role!);
context.goNamed(AppRoutes.HOME.name);
// context.goNamed("notification");
} else {
showErrorTopSnackBarCustom(
context, appLocalization(context).login_incorrect_usernameOrPass);
@@ -214,6 +216,7 @@ class _LoginScreenState extends State<LoginScreen> {
int timeNow = DateTime.now().millisecondsSinceEpoch ~/ 1000;
if (token != "" && (exp - timeNow) > 7200) {
context.goNamed(AppRoutes.HOME.name);
// context.goNamed("notification");
}
}