Flutter SimpleDialog wont pop

2018-04-02T01:06:45.000Z
MySimpleDialog wouldn’t pop so I change my pop line from:

Navigator.pop();

to:

Navigator.of(context, rootNavigator: true).pop();

Now it all works perfectly.