TF-886 Create AuthenticationInfoCache object
This commit is contained in:
@@ -9,4 +9,5 @@ class CachingConstants {
|
||||
static const int RECENT_SEARCH_HIVE_CACHE_IDENTIFY = 7;
|
||||
static const int TOKEN_OIDC_HIVE_CACHE_IDENTIFY = 8;
|
||||
static const int ACCOUNT_HIVE_CACHE_IDENTIFY = 9;
|
||||
static const int AUTHENTICATION_INFO_HIVE_CACHE_IDENTIFY = 10;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart';
|
||||
|
||||
part 'authentication_info_cache.g.dart';
|
||||
|
||||
@HiveType(typeId: CachingConstants.AUTHENTICATION_INFO_HIVE_CACHE_IDENTIFY)
|
||||
class AuthenticationInfoCache extends HiveObject with EquatableMixin {
|
||||
|
||||
static const String keyCacheValue = 'authenticationInfoCache';
|
||||
|
||||
@HiveField(0)
|
||||
final String username;
|
||||
|
||||
@HiveField(1)
|
||||
final String password;
|
||||
|
||||
AuthenticationInfoCache(this.username, this.password);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [username, password];
|
||||
}
|
||||
Reference in New Issue
Block a user