I have a dialog with a custom button whos onPressed event closes the dialog:
onPressed: () {
Navigator.pop(context);
},
When the button is pressed and the dialog is hidden, however after whatever time is defined in the autoHide property of the first dialog Dismiss is called again and another Navigator.pop(context); is called.
I confirmed this by using onDismissCallback: ((type) => {print('CLOSING MENU FROM: $type')}),
which results in:
CLOSING MENU FROM: DismissType.other when the button is pressed and
CLOSING MENU FROM: DismissType.autoHide after the autoHide timer is hit.
I have a dialog with a custom button whos onPressed event closes the dialog: onPressed: () { Navigator.pop(context); }, When the button is pressed and the dialog is hidden, however after whatever time is defined in the autoHide property of the first dialog Dismiss is called again and another Navigator.pop(context); is called.
I confirmed this by using onDismissCallback: ((type) => {print('CLOSING MENU FROM: $type')}), which results in: CLOSING MENU FROM: DismissType.other when the button is pressed and CLOSING MENU FROM: DismissType.autoHide after the autoHide timer is hit.