DEV Community

loading...

Discussion on: Flutter BLoC: Right way to Handle navigation

Collapse
alexandreroba profile image
Alexandre Roba

Hi, thanks for sharing.

Any idea why ShowDialog when called from the bloc fails (It does not raise an error, There is just no dialog displayed... :()
} else if (event is ShowError) {
showDialog(
context: navigatorKey.currentContext,
builder: (context) {
return RedDialog(
title: 'title',,
message:
'message',,
onNext: () {
Navigator.of(context).pop();
},
nextLabel: 'nest',,
);
});
}

Collapse
pedromassango profile image
Pedro Massango Author

Everything looks good. Are you sure that ShowError event is being fired?