mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 19:07:55 +00:00
door lock
This commit is contained in:
@@ -200,6 +200,9 @@ class OfflineOneTimePasswordPage extends StatelessWidget {
|
||||
if(generated==false){
|
||||
smartDoorBloc.add(GenerateAndSavePasswordOneTimeEvent(context: context));
|
||||
}else{
|
||||
if(smartDoorBloc.passwordNameController.text.isNotEmpty){
|
||||
smartDoorBloc.add(RenamePasswordEvent());
|
||||
}
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -163,7 +163,6 @@ class CreateTemporaryPassword extends StatelessWidget {
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
type == 'Online Password'?
|
||||
DefaultContainer(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
child: ListTile(
|
||||
@@ -182,33 +181,7 @@ class CreateTemporaryPassword extends StatelessWidget {
|
||||
applyTheme: true,
|
||||
)),
|
||||
),
|
||||
) :
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: MediaQuery.of(context).size.width/1.5,
|
||||
child: DefaultButton(
|
||||
isDone: generated,
|
||||
isLoading: smartDoorBloc.isSavingPassword ,
|
||||
borderRadius: 30,
|
||||
backgroundColor:Colors.blueGrey ,
|
||||
onPressed: () {
|
||||
if(generated==false){
|
||||
if(type =='Time-Limited'){
|
||||
smartDoorBloc.add(GenerateAndSavePasswordTimeLimitEvent(context: context));
|
||||
}else{
|
||||
smartDoorBloc.add(GenerateAndSavePasswordOneTimeEvent(context: context));
|
||||
}
|
||||
}else{
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
child: const BodyMedium(
|
||||
text: 'Generate & Save Password',
|
||||
fontWeight: FontWeight.normal,
|
||||
fontColor: Colors.white,
|
||||
),),
|
||||
),
|
||||
),
|
||||
) ,
|
||||
const SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
|
||||
@@ -264,6 +264,9 @@ class OfflineTimeLimitPasswordPage extends StatelessWidget {
|
||||
GenerateAndSavePasswordTimeLimitEvent(
|
||||
context: context));
|
||||
} else {
|
||||
if(smartDoorBloc.passwordNameController.text.isNotEmpty){
|
||||
smartDoorBloc.add(RenamePasswordEvent());
|
||||
}
|
||||
Navigator.pop(context);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user