marcos930807 / awesomeDialogs

A new Flutter package project for simple a awesome dialogs
Other
339 stars 110 forks source link

Null check operator used on a null value #121

Open Aljnk opened 1 year ago

Aljnk commented 1 year ago

awesome_dialog 3.0.2 This problem appears only main page:

1

2

Aljnk commented 1 year ago

This hook give the same result: 3 4

Aljnk commented 1 year ago

Sorry, I found error - two times call Navigator.pop(context);

DigitalSolomon commented 1 year ago

Error in the package or in your app code? I'm running into this error as well.

Domenic-MZS commented 1 year ago

Yes, it's an error on the unmounted dialog context... I fixed it by manually dismissing the dialog, keeping the navigator instance cached before the dialog being showed like:

final router = Navigator.of(context, rootNavigator: useRootNavigator);

AwesomeDialog(...).show();

then you can use the cached router to call pop() on the dismissCallback or something...