MIH Auth Offline First Change

This commit is contained in:
yaso 2026-07-08 13:08:03 +02:00
parent a5bdee892c
commit 9d30face3d
13 changed files with 425 additions and 55 deletions

View file

@ -33,7 +33,9 @@ class _MihSignInState extends State<MihSignIn> {
//sign user in
Future<void> signUserIn() async {
context.read<MzansiProfileProvider>().reset();
MzansiProfileProvider profileProvider =
context.read<MzansiProfileProvider>();
profileProvider.reset();
try {
successfulSignIn = await MihAuthenticationServices().signUserIn(
emailController.text,
@ -43,6 +45,8 @@ class _MihSignInState extends State<MihSignIn> {
if (!successfulSignIn) {
MihAlertServices().loginErrorAlert(context);
passwordController.clear();
} else {
await profileProvider.syncWithMihServerData();
}
} on Exception {
Navigator.of(context).pop();