You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a class that I'd like to navigate to, defined by a Flurio handler, like so:
...
myFluroRouter.define('/foobars/:id/edit', handler: new Handler(
handlerFunc: (BuildContext context, Map<String, dynamic> params) {
final String id = params['id']?.first;
return new FoobarEdit(new Key(id), int.parse(id));
}));
What I'd like to do now is be able to pass in a callback to FoobarEdit. This callback is contextual and depends on the class that is invoking the constructor for this class, like so:
...
myFluroRouter.define('/foobars/:id/edit', handler: new Handler(
handlerFunc: (BuildContext context, Map<String, dynamic> params) {
final String id = params['id']?.first;
return new FoobarEdit(new Key(id), int.parse(id), myFoobarCallbackFunc);
}));
What do you think the best approach for this is? It seems like for now, I'm forced to use the traditional
Flutter Navigate class like so:
Navigator.push(
context, new MaterialPageRoute(builder: (context) => new FoobarEdit(...));
Is there a better way to do this?
The text was updated successfully, but these errors were encountered:
Hello there,
I have a class that I'd like to navigate to, defined by a Flurio handler, like so:
What I'd like to do now is be able to pass in a callback to
FoobarEdit
. This callback is contextual and depends on the class that is invoking the constructor for this class, like so:What do you think the best approach for this is? It seems like for now, I'm forced to use the traditional
Flutter
Navigate
class like so:Is there a better way to do this?
The text was updated successfully, but these errors were encountered: