Closed vipuluthaiah closed 3 years ago
Hey, this error comes with the new update of Flutter SDK, because the Router is a preexisting class of SDK.
You can fix it in two ways..
lib/routes/routes.dart
replace the Router class with a different name and run the build_runner command, and replace all imports with the newly generated routes.gr.dart
file.
Yeh i have already done that..But m8 it works on debug ,But when i run (flutter build apk) apk have many problem
Like only some features are loading .Eg:Only news load rest there is no option to go back
this is the apk .I cant see the back button and many other features r missing
The name 'Router' is defined in the libraries 'package:flutter/src/widgets/router.dart' and 'package:inshort_clone/routes/routesgr.dart'. Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.