Navigator(
onUnknownRoute: (settings) {
return MaterialPageRoute(
fullscreenDialog: true,
builder: (context) {
return Container(color: Colors.red);
);
},
settings: settings);
},
initialRoute: "broken",
onGenerateRoute: Router({
"/": (context, match) => MainScreen(),
"/splash": (context, match) => SplashScreen(),
}).get,
),
flutter: Bad state: No element
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #0 Iterable.first (dart:core/iterable.dart:518:7)
flutter: #1 Router.get (package:flutter_router/flutter_router.dart:13:123)
flutter: #2 NavigatorState._routeNamed (package:flutter/src/widgets/navigator.dart:1426:29)
flutter: #3 NavigatorState.initState (package:flutter/src/widgets/navigator.dart:1367:17)