enjkvbej / navigator_manager Goto Github PK
View Code? Open in Web Editor NEWflutter navigator2.0 manager support app&web
License: MIT License
flutter navigator2.0 manager support app&web
License: MIT License
I want to use this plugin to manage the navigation and routing of my application except that when I use as strategy le path the navigation and routing does not work anymore here is an example of code to change strategy
if(kIsWeb){
setUrlStrategy(PathUrlStrategy());
}
Nice Navigator!
Flutter: 2.0.3
现象:
不做任意修改,直接在IDE中使用Hot Reload功能,出现报错:
'package:flutter/src/widgets/navigator.dart': Failed assertion: line 3364 pos 14: 'observer.navigator == null': is not true.
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
https://github.com/flutter/flutter/issues/new?template=2_bug.md
The relevant error-causing widget was:
MaterialApp file:///.../main.dart:57:24
When the exception was thrown, this was the stack:
#2 NavigatorState.initState (package:flutter/src/widgets/navigator.dart:3364:14)
#3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4632:57)
#4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4469:5)
#5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3541:14)
#6 Element.updateChild (package:flutter/src/widgets/framework.dart:3303:20)
再次点击Hot reload, 场景恢复并重置
最小复现场景
var routes = {
"/": (_, __) => CreateRoutePage(name: 'splash', child: PageSplash()),
};
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
final _routerDelegate = LRouterDelegate(routes: routes);
return MaterialApp.router(
debugShowCheckedModeBanner: false,
routerDelegate: _routerDelegate,
routeInformationParser: LRouteInformationParser(),
);
}
}
clsss PageSplash extends StatelessWidget {
Widget build(BuildContext context) {
return Containre();
}
}
Flutter SDK升级2.8以上版本会有冲突
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.