RouteDecoder.fromRoute constructor

RouteDecoder.fromRoute(
  1. String location, {
  2. Object? arguments,
})

Implementation

factory RouteDecoder.fromRoute(String location, {Object? arguments}) {
  var uri = Uri.parse(location);
  final args = PageSettings(uri, arguments);
  final decoder = (Get.rootController.rootDelegate).matchRoute(
    location,
    arguments: args,
  );
  decoder.route = decoder.route?.copyWith(
    completer: null,
    arguments: args,
    parameters: args.params,
  );
  return decoder;
}