I find the name Urls for the enum is not adapted.
I think it should be renamed to casUrl.
Also, the Client would be different:
class Client {
final casUrl _url;
late String token;
Map<String, String> header = {};
late UserInfo info;
String get url => _enumToUrl(_url);
Client(this._url, username, password) {
login(username, password);
}
///Create this object if you already have a token
Client.fromToken(this.token, this._url) {
header.addAll({'X-Kdecole-Auth': token, 'X-Kdecole-Vers': '3.7.14'});
}
...
I find the name
Urls
for the enum is not adapted. I think it should be renamed tocasUrl
.Also, the Client would be different:
What do you think about it @Freezman31?