GoRouterState constructor Null safety

GoRouterState(
  1. RouteConfiguration _configuration,
  2. {required String location,
  3. required String subloc,
  4. required String? name,
  5. String? path,
  6. String? fullpath,
  7. Map<String, String> params = const <String, String>{},
  8. Map<String, String> queryParams = const <String, String>{},
  9. Map<String, List<String>> queryParametersAll = const <String, List<String>>{},
  10. Object? extra,
  11. Exception? error,
  12. ValueKey<String>? pageKey}
)

Default constructor for creating route state during routing.

Implementation

GoRouterState(
  this._configuration, {
  required this.location,
  required this.subloc,
  required this.name,
  this.path,
  this.fullpath,
  this.params = const <String, String>{},
  this.queryParams = const <String, String>{},
  this.queryParametersAll = const <String, List<String>>{},
  this.extra,
  this.error,
  ValueKey<String>? pageKey,
}) : pageKey = pageKey ??
          ValueKey<String>(error != null
              ? 'error'
              : fullpath != null && fullpath.isNotEmpty
                  ? fullpath
                  : subloc);