Use TupleKey(ObjectKey-AccountId-UserName) to store data to hive
(cherry picked from commit e0ace535d5f3af71eb13598d92524caf2c6d9bbf)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import 'package:model/account/authentication_type.dart';
|
||||
import 'package:model/account/personal_account.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/account_cache.dart';
|
||||
|
||||
extension PersonalAccountExtension on PersonalAccount {
|
||||
AccountCache toCache() {
|
||||
return AccountCache(
|
||||
id,
|
||||
authenticationType.asString(),
|
||||
isSelected: isSelected,
|
||||
accountId: accountId?.id.value,
|
||||
apiUrl: apiUrl,
|
||||
userName: userName?.value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user