flutter-provide icon indicating copy to clipboard operation
flutter-provide copied to clipboard

How can I push a new page without buildContext?

Open PandaCVBRO opened this issue 6 years ago • 2 comments

In Redux I can use navigatorKey.currentState.pushNamed('/someRoute'); to push a new page with out pass the context. How can I do the same thing in flutter-provide?

example: I want to push the Login Page in my SomeNetwork.dart When get a response with status_code = 401.

PandaCVBRO avatar Feb 25 '19 08:02 PandaCVBRO

I got an ungainly solution: cache the buildContext of the root.

Is there any other way?

PandaCVBRO avatar Mar 03 '19 09:03 PandaCVBRO

Hi @PandaCVBRO,

Sorry for the complete silence on this issue (and the repo in general). I've been unsure about the future of the provide package but now I've made the decision to let it go: https://github.com/google/flutter-provide/issues/3#issuecomment-525503648. Please comment over at the linked issue if you have a strong desire to keep the development of this package alive (if so, please link to your fork if you have it).

To be clear, the package will always be available at https://pub.dev/packages/provide — pub doesn't allow packages to "disappear". It won't be updated, though.

filiph avatar Aug 27 '19 22:08 filiph