I was following a tutorial to integrate Authentication in an App I am making. Link: https://devdactic.com/flutter-authentication-appwrite
I am getting this error: The name 'Account' is defined in the libraries 'package:appwrite/appwrite.dart' and 'package:appwrite/models.dart'.
Try using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports. in the auth_api.dart file. Any idea how this can be fixed?
Could you please share your code?
Or what's giving you such error?
Here you go.
Just use prefix in one of them
So it would be import”some-lib” as customName (you can use models )
Then you can access the lib code as models.(the properties)
or possibly you can update latest version there it won't happen
I am on the latest version
Yeah I tried it doesn't work.
It works you just need to add prefix everywhere where the account class from model lib is used
It says it can't find the User class.
User is in latest version there shouldn't be any conflict pls can show how and what you imported
Recommended threads
- Images/Videos in storage appearing broke...
I am running into a storage issue after upgrading my self-hosted Appwrite instance , all of my previously uploaded images and videos are now showing as broken i...
- executeFunction intermittently throws Fo...
Environment: Flutter app using the Appwrite Flutter SDK, calling executeFunction for [describe endpoint, e.g. live-stream-related function]. *Description*: Int...
- How to update from 1.8.1 to 1.9.6
Due to the number of issues reported in version 1.9.5, I am hesitant to proceed with the update. Could anyone advise if version 1.9.6 is stable and resolves tho...