mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Success dialog and Failed dialog changes with VisitorPasswordDialog
This commit is contained in:
@ -246,12 +246,18 @@ class VisitorPasswordBloc
|
|||||||
passwordName: event.passwordName);
|
passwordName: event.passwordName);
|
||||||
if (res == true) {
|
if (res == true) {
|
||||||
emit(SuccessState());
|
emit(SuccessState());
|
||||||
emit(TableLoaded(data));
|
}else {
|
||||||
|
throw Exception('Failed to create password');
|
||||||
}
|
}
|
||||||
|
emit(TableLoaded(data));
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(FailedState(e.toString()));
|
emit(FailedState(e.toString()));
|
||||||
}
|
Navigator.pop(event.context!);
|
||||||
|
stateDialog(
|
||||||
|
context: event.context!,
|
||||||
|
message: e.toString(),
|
||||||
|
title: 'Something Wrong'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
//offline password
|
//offline password
|
||||||
@ -266,10 +272,18 @@ class VisitorPasswordBloc
|
|||||||
passwordName: event.passwordName);
|
passwordName: event.passwordName);
|
||||||
if (res == true) {
|
if (res == true) {
|
||||||
emit(SuccessState());
|
emit(SuccessState());
|
||||||
emit(TableLoaded(data));
|
}else {
|
||||||
|
throw Exception('Failed to create password');
|
||||||
}
|
}
|
||||||
|
emit(TableLoaded(data));
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(FailedState(e.toString()));
|
emit(FailedState(e.toString()));
|
||||||
|
Navigator.pop(event.context!);
|
||||||
|
stateDialog(
|
||||||
|
context: event.context!,
|
||||||
|
message: e.toString(),
|
||||||
|
title: 'Something Wrong');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,11 +302,18 @@ class VisitorPasswordBloc
|
|||||||
);
|
);
|
||||||
if (res == true) {
|
if (res == true) {
|
||||||
emit(SuccessState());
|
emit(SuccessState());
|
||||||
emit(TableLoaded(data));
|
}else {
|
||||||
|
throw Exception('Failed to create password');
|
||||||
}
|
}
|
||||||
|
emit(TableLoaded(data));
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(FailedState(e.toString()));
|
emit(FailedState(e.toString()));
|
||||||
}
|
Navigator.pop(event.context!);
|
||||||
|
stateDialog(
|
||||||
|
context: event.context!,
|
||||||
|
message: e.toString(),
|
||||||
|
title: 'Something Wrong'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void selectDevice(
|
void selectDevice(
|
||||||
|
Reference in New Issue
Block a user