TabState.ofAppRouteMatch constructor

TabState.ofAppRouteMatch(
  1. AppRouteMatch<dynamic, RouteParams> match, {
  2. required IconData tabIcon,
  3. required int tabIndex,
  4. bool isDesktop = true,
  5. required GlobalKey<NavigatorState> key,
})

Implementation

factory TabState.ofAppRouteMatch(AppRouteMatch match,
    {required IconData tabIcon,
    required int tabIndex,
      bool isDesktop = true,
    required GlobalKey<NavigatorState> key}) {
  return TabState(
    route: match.route!,
    tabLabel: match.route!.routeTitle(),
    tabIcon: tabIcon,
    isDesktop: isDesktop,
    navigatorKey: key,
    tabIndex: tabIndex,
  );
}