SafeRoute<TArgs, TResult> constructor

SafeRoute<TArgs, TResult>({
  1. required String name,
  2. required Widget builder(
    1. BuildContext,
    2. TArgs
    ),
})

Creates a new SafeRoute.

  • name is the route path (e.g. '/home').
  • builder is a function that builds the widget for the route, using the provided arguments of type TArgs.

Implementation

SafeRoute({required super.name, required this.builder});