-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type 'Null' is not a subtype of type 'Handler' #227
Comments
Also the example needs to be updated and migrate to null safety. |
======== Exception caught by gesture =============================================================== When the exception was thrown, this was the stack: I also in version 2.0.3, how to repair... |
same here, fluro: ^2.0.3
|
I use dev null-safety channel use 2.0.3 latest version meet the same error. Where is the bad way I used? I can't find from my codes. |
Finally figured this out, it's the notFoundHandler, had to add this: router.notFoundHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, dynamic> params) {
return NotFoundPage();
}); |
Did you make a pull request? |
Not using fluor anymore an i think this is not the only issue with null safety refactoring. |
Seems to be fine otherwise, but might be some things I haven't run into. What are you using now? |
Exception has occurred. |
I had the same issue with Fluro when implementing Flutter Add2App. This issue was happening to me in runtime. I spent several hours trying to find the solution to this issue. Here are my findings - The issue was occurring on the “mathRoute” function in FluroRouter Code on this line - Handler handler = (route != null ? route.handler : notFoundHandler); here I was getting so because the Handler is a not nullable type this error was appearing. So It is just like working with a web URL so, whatever be my “initial route” say “/about”, it will open the home route(“/“) first then the "about" route If you want to know more you can check the “defaultGenerateInitialRoutes” function in the navigator class. Nice documentation is there to explain all of this. To solve this for now I ended up setting my initial route as the home route(“/“). |
Hey guys
Flutter 3.0.5 used to work, but now I've tried it on a new project, but it doesn't work. I really love Flutter, but I'm considering quitting it. Any ideas to save this fabulous plugin? |
Got this issue when compile null safety with flutter 2.0.2.
The text was updated successfully, but these errors were encountered: