Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

The name 'Router' is defined in the libraries ' #7

Closed
vipuluthaiah opened this issue Dec 10, 2020 · 5 comments
Closed

The name 'Router' is defined in the libraries ' #7

vipuluthaiah opened this issue Dec 10, 2020 · 5 comments

Comments

@vipuluthaiah
Copy link

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.
image
image

@imSanjaySoni
Copy link
Owner

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.

  • IMG20201218231159.jpg

@vipuluthaiah
Copy link
Author

Yeh i have already done that..But m8 it works on debug ,But when i run (flutter build apk) apk have many problem

@vipuluthaiah
Copy link
Author

Like only some features are loading .Eg:Only news load rest there is no option to go back

@vipuluthaiah
Copy link
Author

Screenshot_20201219-112807
this is the apk .I cant see the back button and many other features r missing

@vipuluthaiah
Copy link
Author

image
image
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants