What\'s the difference between Navigator.of(context).pop and Navigator.pop(context)?
Navigator.of(context).pop
Navigator.pop(context)
To me both seems to do the same work, what is the actu
There is no difference between the two, source code confirms this. Calling
actually calls
Navigator.of(context).pop()
Source code:
static bool pop(BuildContext context, [ dynamic result ]) { return Navigator.of(context).pop(result); }