register static method

void register(
  1. String path,
  2. dynamic callback(
    1. BuildContext context,
    2. dynamic data
    ), {
  3. dynamic onDone()?,
  4. OdinNavigatorRouteType? type,
  5. Color? backgroundColor,
  6. bool forceFullPage = false,
})

Implementation

static void register(
  String path,
  dynamic Function(BuildContext context, dynamic data) callback, {
  Function()? onDone,
  OdinNavigatorRouteType? type,
  Color? backgroundColor,
  bool forceFullPage = false,
}) {
  _routes[path] = {
    'callback': callback,
    'on_done': onDone,
    'type': type ?? OdinNavigatorRouteType.page,
    'background_color': backgroundColor ?? Colors.white,
    'force_full_page': forceFullPage,
  };
}