TF-886 Remove method get/save/remove user profile because not used
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:model/model.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/local/authentication_info_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/login/data/model/authentication_info_cache.dart';
|
||||
@@ -32,25 +30,6 @@ class CredentialRepositoryImpl extends CredentialRepository {
|
||||
await sharedPreferences.remove(LoginConstant.keyBaseUrl);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<UserProfile> getUserProfile() async {
|
||||
final json = sharedPreferences.getString(LoginConstant.keyUserProfile) ?? '';
|
||||
Map<String, dynamic> mapObject = jsonDecode(json);
|
||||
return UserProfileResponse.fromJson(mapObject).toUserProfile();
|
||||
}
|
||||
|
||||
@override
|
||||
Future removeUserProfile() async {
|
||||
await sharedPreferences.remove(LoginConstant.keyUserProfile);
|
||||
}
|
||||
|
||||
@override
|
||||
Future saveUserProfile(UserProfile userProfile) async {
|
||||
final userProfileResponse = userProfile.toUserProfileResponse();
|
||||
final json = jsonEncode(userProfileResponse.toJson());
|
||||
await sharedPreferences.setString(LoginConstant.keyUserProfile, json);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> storeAuthenticationInfo(AuthenticationInfoCache authenticationInfoCache) {
|
||||
return _authenticationInfoCacheManager.storeAuthenticationInfo(authenticationInfoCache);
|
||||
|
||||
Reference in New Issue
Block a user