appwrite / sdk-for-flutter

[READ-ONLY] Official Appwrite Flutter SDK πŸ’™

Home Page:https://appwrite.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ› Bug Report: Naming ap Account and user model Account is not the best decision.

biovolt opened this issue Β· comments

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?

@biovolt Why is this not planned?

commented

Hi @mariomurrent-softwaresolutions
This is a duplicate of #93

Please got to the other bug report and rase your concern there