CreateTemporaryPassword

This commit is contained in:
mohammad
2024-06-30 12:49:05 +03:00
parent 578b9586d2
commit 695d6c109b
4 changed files with 18 additions and 10 deletions
@@ -219,20 +219,24 @@ class SmartDoorBloc extends Bloc<SmartDoorEvent, SmartDoorState> {
}
bool _validateInputs(BuildContext context) {
if (passwordController.text.length<7) {
CustomSnackBar.displaySnackBar('Password less than 7');
return true;
}
if (passwordController.text.isEmpty) {
_showSnackBar(context, 'Password required');
CustomSnackBar.displaySnackBar('Password required');
return true;
}
if (passwordNameController.text.isEmpty) {
_showSnackBar(context, 'Password name required');
CustomSnackBar.displaySnackBar('Password name required');
return true;
}
if (effectiveTime == 'Select Time' || effectiveTimeTimeStamp == null) {
_showSnackBar(context, 'Select effective time');
CustomSnackBar.displaySnackBar('Select effective time');
return true;
}
if (expirationTime == 'Select Time' || expirationTimeTimeStamp == null) {
_showSnackBar(context, 'Select expiration time');
CustomSnackBar.displaySnackBar('Select expiration time');
return true;
}
if (repeat == true &&