pushNamed method
void
pushNamed({})
根据名称跳转页面
Implementation
void pushNamed(
{required String name,
ResultCallBack? onResult,
Object? arguments,
Widget? emptyPage,
bool custom = true,
String? restorationId}) {
var page = pageMap?[name];
_location = name;
if (custom && page == null) {
page = _routePathCallBack
?.call(RouteInformation(uri: Uri.parse(_location!)));
}
if (page == null) {
_location = '404';
page = emptyPage ?? const EmptyPage();
}
push(
page: page,
name: name,
onResult: onResult,
arguments: arguments,
restorationId: restorationId);
}