auto_route_library
auto_route_library copied to clipboard
Unhandled Exception: type 'AutoRoutePage<dynamic>' is not a subtype of type 'AutoRoutePage<Object>' in type
Exception
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'AutoRoutePage<dynamic>' is not a subtype of type 'AutoRoutePage<Object>' in type cast
#0 StackRouter._addEntry (package:auto_route/src/router/controller/routing_controller.dart:1552:18)
#1 StackRouter._pushAllGuarded (package:auto_route/src/router/controller/routing_controller.dart:1522:29)
<asynchronous suspension>
there is some exceptions i am getting in flutter windows. it seems like coming from package plz look into this.
[√] Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.22621.2861], locale en-IN)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.3.2)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.85.1)
[√] Connected device (3 available)
[√] Network resources
Have the same problem when trying to return a result from a route.
I have added types everywhere as recommended but it still gets an error:
Unhandled Exception: type 'AutoRoutePage<dynamic>' is not a subtype of type 'AutoRoutePage<MyCustomType>'
any solution here?
The same problem Version auto_route: 7.8.4
@filak8 @eshfield have you added return type to @<RETURN_TYPE>RoutePage()
@filak8 @eshfield have you added return type to @<RETURN_TYPE>RoutePage()
No( This was solution for me. Sorry for wasting your time.
@filak8 @eshfield have you added return type to @<RETURN_TYPE>RoutePage()
Thanks a lot! This code example did the trick:
@RoutePage<bool>()
class LoginPage extends StatelessWidget {}