of static method

RoutingArguments from current ModalRoute

Implementation

static RoutingArguments? of(BuildContext context) {
  final route = ModalRoute.of(context);

  return route?.settings.name?.routingArguments
    ?..isCurrent = route?.isCurrent ?? false;
}