buildRoute method

MaterialPageRoute buildRoute(
  1. WidgetNodeSpec spec, {
  2. Map? state,
})

Creates a MaterialPageRoute for a given Screen spec.

Implementation

MaterialPageRoute buildRoute(WidgetNodeSpec spec, {Map? state}) {
  return MaterialPageRoute(
    settings: RouteSettings(name: spec.name, arguments: spec),
    builder: (context) => buildScreen(context, spec, state: state),
  );
}