pushNamed<T extends Object> method
- @optionalTypeArgs
Push a named route onto the navigator that most tightly encloses the given context.
Sample code
Typical usage is as follows:
void _didPushButton() {
Navigator.pushNamed(context, '/nyc/1776');
}
Implementation
@optionalTypeArgs
static Future<T> pushNamed<T extends Object>(BuildContext context, String routeName) {
return Navigator.of(context).pushNamed<T>(routeName);
}