Refactor visitor password dialog navigation to return specific values on pop

This commit is contained in:
mohammad
2025-06-24 16:06:53 +03:00
parent db9e856bca
commit c6e98fa245

View File

@ -102,7 +102,7 @@ class VisitorPasswordDialog extends StatelessWidget {
], ],
)) ))
.then((v) { .then((v) {
Navigator.of(context).pop(true); Navigator.of(context).pop(v);
}); });
} else if (state is FailedState) { } else if (state is FailedState) {
visitorBloc.stateDialog( visitorBloc.stateDialog(
@ -476,7 +476,7 @@ class VisitorPasswordDialog extends StatelessWidget {
child: DefaultButton( child: DefaultButton(
borderRadius: 8, borderRadius: 8,
onPressed: () { onPressed: () {
Navigator.of(context).pop(true); Navigator.of(context).pop(null);
}, },
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: Text( child: Text(
@ -651,7 +651,7 @@ class VisitorPasswordDialog extends StatelessWidget {
child: DefaultButton( child: DefaultButton(
borderRadius: 8, borderRadius: 8,
onPressed: () { onPressed: () {
Navigator.of(context).pop(); Navigator.of(context).pop(null);
}, },
backgroundColor: Colors.white, backgroundColor: Colors.white,
child: Text( child: Text(