pushNamed<T extends Object?> method
push a page with String, similar to Navigator.of(context).pushNamed call eg.. - MuffinNavigator.of(context).pushNamed
Implementation
Future<T?> pushNamed<T extends Object?>(String named,
[dynamic arguments]) async {
final Completer<T?> callback = Completer<T?>();
///set to current route
callbacks![_history.last] = callback;
/// find route , if exit push, else find in native
if (foundInTotalRoutes(named)) {
await _push(named, arguments: arguments);
} else {
/// found in native
bool find = await NavigatorChannel.pushNamed(named, arguments);
if (!find) {
///will show not found
await _push(named, arguments: arguments);
}
}
return callback.future;
}