π Bug Report: Naming ap Account and user model Account is not the best decision.
biovolt opened this issue Β· comments
Jo commented
π Reproduction steps
Use appwrite ^8.1.0 and try to get a user model .e.g.
import 'package:appwrite/appwrite.dart';
import 'package:appwrite/models.dart';
class Test {
late final Client _client;
late final Account _account;
Test (){
_client = Client(
endPoint: "",
).setProject("").setSelfSigned();
_account = Account(_client);
}
Future<Account> getUser() async {
final Account res = await _account.get();
return Account.fromMap(res.toMap());
}
}
π Expected behavior
I expect the service Account and the model Account // (User) to have different class names.
e.g. AccountUser or UserAccount or similar.
π Actual Behavior
Account is ambiguous because there are 2 classes in the same SDK called Account.
And the code won't compile
π² Appwrite version
Version 1.0.x
π» Operating system
MacOS
𧱠Your Environment
No response
π Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
π’ Have you read the Code of Conduct?
- I have read the Code of Conduct
Mario Murrent commented
@biovolt Why is this not planned?
Jo commented
Hi @mariomurrent-softwaresolutions
This is a duplicate of #93
Please got to the other bug report and rase your concern there