auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Including Micro/External Packages

Open AliAltiyev opened this issue 1 year ago • 3 comments

The editor could not be opened because the file was not found. The following assertion was thrown building AutoTabsScaffold: 'package:auto_route/src/router/controller/root_stack_router.dart': Failed assertion: line 168 pos 12: 'builder != null': is not true.

The relevant error-causing widget was: AutoTabsScaffold AutoTabsScaffold:file:///C:/Users/alidr/Desktop/flutter_projects/medix/medix/features/dashboard/lib/ui/page/dashboard.dart:11:12

Here is code:

_import 'package:dashboard/dashboard.dart';

@RoutePage() class DashboardPage extends StatelessWidget { const DashboardPage({ super.key, });

@override Widget build(BuildContext context) { return AutoTabsScaffold( routes: const <PageRouteInfo>[ MainRouteRoute(), MediatationRoute(), SoundRoute(), ], bottomNavigationBuilder: (, TabsRouter tabsRouter) { return BottomNavigationBar( currentIndex: tabsRouter.activeIndex, onTap: tabsRouter.setActiveIndex, items: const <BottomNavigationBarItem>[ BottomNavigationBarItem(label: 'Users', icon: Icon(Icons.abc)), BottomNavigationBarItem(label: 'Posts', icon: Icon(Icons.abc)), BottomNavigationBarItem(label: 'Settings', icon: Icon(Icons.abc)), ], ); }, ); } } My app_router.dart file:

_### _import 'package:navigation/navigation.dart';

export 'package:dashboard/module.dart'; export 'package:main/module.dart';

part 'app_router.gr.dart';

@AutoRouterConfig( replaceInRouteName: 'Screen,Route', modules: <Type>[ DashboardPackageModule, MainPackageModule, MeditationPackageModule, SoundPackageModule, ], )

/// The AppRouter class is a router configuration class that defines the routes for the application. /// It extends the _$AppRouter class, which is generated by the auto_route package. class AppRouter extends $AppRouter { /// Returns a list of AutoRoute objects representing the defined routes in the application. @override List<AutoRoute> get routes => <AutoRoute>[ AutoRoute( initial: true, path: '/', page: DashboardRoute.page, children: <AutoRoute>[ AutoRoute( page: MainRouteRoute.page, path: 'main', ), AutoRoute( page: MediatationRoute.page, path: 'meditation', ), AutoRoute( page: SoundRoute.page, path: 'sound', ), ], ), ]; }_

AliAltiyev avatar Nov 26 '23 13:11 AliAltiyev

@Milad-Akarie @AliAltiyev I have the same issue. Did you solve this issue?

ilknurimamhaliloglu avatar Jan 25 '24 07:01 ilknurimamhaliloglu

anyone solve this issue?

anasboyka avatar Feb 29 '24 11:02 anasboyka