You don't need this
Added appwrite already @Maniac_Fighter
umm, So the error says it's already defined. Did you made your own defination?
The error would show that where its defined
No I didn't
Could you please share the screenshot of the error
Here it is
Oh. So yess, ambuiguity is expected here. you can add prefix in model imports, or if you aren't using models for now, you can remove them
but the models will be needed later for documents though
how do I overcome that later on
as said you can do this
package:appwrite/models.dart as models
and whenever you need Account from models do this
models.Account
okay
It means two different kinds of Accounts right?
cause after adding model, the error didn't resurface
So there are two Accounts One Account (https://github.com/appwrite/sdk-for-flutter/blob/e5236a1375875f176937392360c6864888efb677/lib/services/account.dart) which does all the necessary calls for you like createAccount, getAccount etc
The Other Account is the response Model(https://github.com/appwrite/sdk-for-flutter/blob/91b9d02d45eb58aefae43f4e82c7d03fafd4809e/lib/src/models/account.dart)
This is being returned when you usually call account.get
Okay then
I'll check for all
I'm super grateful @Maniac_Fighter I really appreciate your efforts and time spent. Thank you so much.
Ooooo
Wonderful, I'm beginning to understand it now
[SOLVED] The name 'Account' is defined in the libraries
The name 'Account' is defined in the libraries
@Maniac_Fighter still on it
what do you mean?
He gave some resource to use. But I could not figure out solution
this should have been it: https://discord.com/channels/564160730845151244/1082638138066874368/1082651982369665086
@dammy to clarify further, a Service is a class used to make API calls. a Model is an object that holds data. does that make sense?
yes @Steven
that means the creation of service is like a platform to which api calls can be initiated while the model holds data to be used or something related
[SOLVED] The name 'Account' is defined in the libraries
Recommended threads
- Issue with email/password auth in Flutte...
is there an issue with Flutter auth right now? I am unable to login all of a sudden in my app with `createEmailPasswordSession`... when I go to verify the login...
- Dart runtime functions are timing out an...
My appwrite function is not executing at all and showing the error in error logs: I tried redeploying. Still no luck. I have set the function to ise maximum re...
- 403 The current user has been blocked.
Hello, I have a free plan; I've tried to access my project and I get the message "403 The current user has been blocked." I have database, sites, and auth in us...