feat(auth): connect Flutter login to MSAL
This commit is contained in:
@@ -45,9 +45,18 @@ class _ResponsableScreenState extends State<ResponsableScreen> {
|
||||
setState(() => _future = _charger());
|
||||
}
|
||||
|
||||
void _quitter() {
|
||||
AuthService.clearSession();
|
||||
Navigator.of(context).pop();
|
||||
Future<void> _quitter() async {
|
||||
try {
|
||||
await AuthService.signOut();
|
||||
if (mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} catch (error) {
|
||||
if (!mounted) return;
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(error.toString())));
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _changerStatut(Map<String, dynamic> anomalie) async {
|
||||
|
||||
Reference in New Issue
Block a user