toNamed<T> method

  1. @override
Future<T?> toNamed<T>(
  1. String page, {
  2. dynamic arguments,
  3. dynamic id,
  4. bool preventDuplicates = true,
  5. Map<String, String>? parameters,
})
override

Implementation

@override
Future<T?> toNamed<T>(
  String page, {
  dynamic arguments,
  dynamic id,
  bool preventDuplicates = true,
  Map<String, String>? parameters,
}) async {
  final args = _buildPageSettings(page, arguments);
  final route = _getRouteDecoder<T>(args);
  if (route != null) {
    return _push<T>(route);
  } else {
    goToUnknownPage();
  }
  return null;
}