Comments (2)
I found the reason for the error.
If i set navigatorObservers,it will throw exception.
GetMaterialApp(
navigatorObservers: [
GetXRouterObserver()
],
)
class GetXRouterObserver extends NavigatorObserver {
@override
void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) {
RouterReportManager.reportCurrentRoute(route);
}
@override
void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) async {
RouterReportManager.reportRouteDispose(route);
}
}
from getx.
I found the reason for the error.
If i set navigatorObservers,it will throw exception.
GetMaterialApp( navigatorObservers: [ GetXRouterObserver() ], ) class GetXRouterObserver extends NavigatorObserver { @override void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) { RouterReportManager.reportCurrentRoute(route); } @override void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) async { RouterReportManager.reportRouteDispose(route); } }
有办法在不移除这个observer的情况下解决这个bug吗?
我这边有个问题:我想在路由之前判断用户是否登录,如果没登录我路由就不跳转,但是中间件必须要返回一个RoutSetting,因此我想着监听路由跳转,加了observer,但是碰到跟你一样 的报错。
from getx.
Related Issues (20)
- “Getx Controller Error: ‘AppClient?’ not found in Flutter” HOT 1
- Get.toNamed preventDuplicates: false has no effect HOT 11
- GetxController dispose is not working HOT 3
- setUrlStrategy in subfolder, error 404 HOT 1
- Get.toNamed parameters [preventDuplicates] and GetPage() parameters [preventDuplicates]Not universal
- Get.snackbar() doesn't work successfully when starting the app for the first time. HOT 3
- [GetMiddleware] RouteDecoder.fromRoute can't Jump
- Flutter web deepLink HOT 4
- Using Base URL for graphql requests doesn't work
- 你们的PopScope正常嘛,我这边canPop=false时在iOS上依然能够侧滑返回,android上倒是正常 HOT 9
- 能否说明下 Get5 的路由 HOT 1
- Flutter web Getx routing dynamic API extension for testing
- Got status 3xx with followRedirects is true
- KINDLY COMMUNICATE WITH COMMUNITY PLEASE ( dear developer) you are making us loose hope HOT 8
- RTL Icon Padding Issue in Get.rawSnackbar() HOT 1
- PosScope in IOS while using Getx Route management. HOT 8
- Get.to 为什么在第一次跳转的时候当前route没有过渡效果 HOT 1
- Flutter getx trparams (@ variables substitution) does not work for Hebrew locale. Reported in StackOverflow.com HOT 3
- get.snackbar's selfsize HOT 3
- Hot reload does not work in Windows HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getx.