Hero
You don't need this
Votes
0
Replies
24
Participants
Unknown
Messages
25
Hero
You don't need this
Rank 4: Virtual Machine
Added appwrite already
@Maniac_Fighter
Hero
umm, So the error says it's already defined. Did you made your own defination?
Hero
The error would show that where its defined
Rank 4: Virtual Machine
No I didn't
Hero
Could you please share the screenshot of the error
Rank 4: Virtual Machine
Here it is
Hero
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
Rank 4: Virtual Machine
but the models will be needed later for documents though
how do I overcome that later on
Hero
as said you can do this
package:appwrite/models.dart as models
and whenever you need Account from models do this
models.Account
Rank 4: Virtual Machine
okay
Rank 4: Virtual Machine
It means two different kinds of Accounts right?
cause after adding model, the error didn't resurface
Hero
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
Rank 4: Virtual Machine
Okay then
I'll check for all
Rank 4: Virtual Machine
I'm super grateful @Maniac_Fighter
I really appreciate your efforts and time spent. Thank you so much.
Rank 4: Virtual Machine
Ooooo
Wonderful, I'm beginning to understand it now
Admin
[SOLVED] The name 'Account' is defined in the libraries
Rank 4: Virtual Machine
The name 'Account' is defined in the libraries
Rank 4: Virtual Machine
@Maniac_Fighter still on it
Admin
what do you mean?
Rank 4: Virtual Machine
He gave some resource to use. But I could not figure out solution
Admin
this should have been it: https://discord.com/channels/564160730845151244/1082638138066874368/1082651982369665086
Admin
@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?
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
[SOLVED] The name 'Account' is defined in the libraries