RixaPage constructor

RixaPage({
  1. required String name,
  2. GlobalKey<NavigatorState>? parentNavigatorKey,
  3. String? route,
  4. FutureOr<String> description(
    1. RouteProperties properties
    )?,
  5. Widget builder(
    1. BuildContext context,
    2. RouteProperties properties
    )?,
  6. FutureOr<String?> redirect(
    1. RouteProperties properties
    )?,
  7. FutureOr<String?> redirectedChild(
    1. RouteProperties properties
    )?,
  8. Map<String, String>? params,
  9. PageTransition? pageTransition,
  10. String? title,
  11. List<PageBase> children = const <PageBase>[],
  12. ScreenModeLimits? screenModeLimits,
  13. PageFonts? fonts,
})

Implementation

RixaPage({
  required String name,
  GlobalKey<NavigatorState>? parentNavigatorKey,
  String? route,
  FutureOr<String> Function(RouteProperties properties)? description,
  Widget Function(BuildContext context, RouteProperties properties)? builder,
  FutureOr<String?> Function(RouteProperties properties)? redirect,
  FutureOr<String?> Function(RouteProperties properties)? redirectedChild,
  Map<String, String>? params,
  PageTransition? pageTransition,
  String? title,
  super.children,
  super.screenModeLimits,
  super.fonts,
})  : _name = name,
      _builder = builder,
      _redirect = redirect,
      _description = description,
      _parentNavigatorKey = parentNavigatorKey,
      _pageTransition = pageTransition,
      _redirectedChild = redirectedChild,
      _params = params,
      _title = title,
      _route = route ?? "/$name" {
  for (var child in children) {
    child.setParent = this;
  }
}