From 4c1594d6f02285edd9bca7cf356f06880857063d Mon Sep 17 00:00:00 2001 From: sienna-sterling <112006749+sienna-sterling@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:09:54 -0500 Subject: [PATCH] =?UTF-8?q?fix(storage=20optimization):=20Removed=20and=20?= =?UTF-8?q?replaced=20used=20of=20PStore=20with=20G=E2=80=A6=20(#1730)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(storage optimization): Removed and replaced used of PStore with GetStorage --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com> Co-authored-by: ggurdin --- lib/pages/chat_list/chat_list.dart | 4 +- .../bookmarked_activities_repo.dart | 12 ++- .../get_analytics_controller.dart | 4 +- .../put_analytics_controller.dart | 9 +- .../chat_list/utils/app_version_util.dart | 8 +- .../utils/chat_list_handle_space_tap.dart | 7 +- .../common/controllers/pangea_controller.dart | 3 - lib/pangea/common/utils/p_store.dart | 67 ------------- lib/pangea/common/widgets/customized_svg.dart | 3 +- lib/pangea/login/pages/user_settings.dart | 4 +- lib/pangea/login/utils/sso_login_action.dart | 4 +- .../spaces/controllers/space_controller.dart | 22 ++--- lib/pangea/spaces/utils/join_with_link.dart | 3 +- .../controllers/subscription_controller.dart | 21 +++-- .../models/base_subscription_info.dart | 8 +- .../user/controllers/user_controller.dart | 2 + lib/pangea/user/utils/p_login.dart | 4 +- pubspec.lock | 94 +++++++++---------- 18 files changed, 111 insertions(+), 168 deletions(-) delete mode 100644 lib/pangea/common/utils/p_store.dart diff --git a/lib/pages/chat_list/chat_list.dart b/lib/pages/chat_list/chat_list.dart index c3826b1e4..7116796b9 100644 --- a/lib/pages/chat_list/chat_list.dart +++ b/lib/pages/chat_list/chat_list.dart @@ -507,10 +507,10 @@ class ChatListController extends State spaceId, ); + // #Pangea final String? justInputtedCode = - MatrixState.pangeaController.pStoreService.read( + MatrixState.pangeaController.classController.chatBox.read( PLocalKey.justInputtedCode, - isAccountData: false, ); final newSpaceCode = space?.classCode(context); if (newSpaceCode == justInputtedCode) return; diff --git a/lib/pangea/activity_planner/bookmarked_activities_repo.dart b/lib/pangea/activity_planner/bookmarked_activities_repo.dart index fd91ac9b9..d4f391ff8 100644 --- a/lib/pangea/activity_planner/bookmarked_activities_repo.dart +++ b/lib/pangea/activity_planner/bookmarked_activities_repo.dart @@ -6,15 +6,16 @@ import 'package:uuid/uuid.dart'; import 'package:fluffychat/pangea/activity_planner/activity_plan_model.dart'; class BookmarkedActivitiesRepo { - static final GetStorage _storage = GetStorage('bookmarked_activities'); static const Uuid _uuid = Uuid(); + static final GetStorage _bookStorage = GetStorage('bookmarked_activities'); + /// save an activity to the list of bookmarked activities /// returns the activity with a bookmarkId static Future save(ActivityPlanModel activity) async { activity.bookmarkId ??= _uuid.v4(); - await _storage.write( + await _bookStorage.write( activity.bookmarkId!, activity.toJson(), ); @@ -23,15 +24,16 @@ class BookmarkedActivitiesRepo { return activity; } - static Future remove(String bookmarkId) => _storage.remove(bookmarkId); + static Future remove(String bookmarkId) => + _bookStorage.remove(bookmarkId); static bool isBookmarked(ActivityPlanModel activity) { return activity.bookmarkId != null && - _storage.read(activity.bookmarkId!) != null; + _bookStorage.read(activity.bookmarkId!) != null; } static List get() { - final list = _storage.getValues(); + final list = _bookStorage.getValues(); if (list == null) return []; diff --git a/lib/pangea/analytics_misc/get_analytics_controller.dart b/lib/pangea/analytics_misc/get_analytics_controller.dart index a00c9999a..dcd8f20a0 100644 --- a/lib/pangea/analytics_misc/get_analytics_controller.dart +++ b/lib/pangea/analytics_misc/get_analytics_controller.dart @@ -3,6 +3,7 @@ import 'dart:math'; import 'package:flutter/material.dart'; +import 'package:get_storage/get_storage.dart'; import 'package:matrix/matrix.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; @@ -22,6 +23,7 @@ import 'package:fluffychat/pangea/learning_settings/models/language_model.dart'; /// A minimized version of AnalyticsController that get the logged in user's analytics class GetAnalyticsController extends BaseController { + final GetStorage analyticsBox = GetStorage("analytics_storage"); late PangeaController _pangeaController; late MessageAnalyticsController perMessage; @@ -173,7 +175,7 @@ class GetAnalyticsController extends BaseController { /// eventID. Map> get messagesSinceUpdate { try { - final dynamic locallySaved = _pangeaController.pStoreService.read( + final dynamic locallySaved = analyticsBox.read( PLocalKey.messagesSinceUpdate, ); if (locallySaved == null) return {}; diff --git a/lib/pangea/analytics_misc/put_analytics_controller.dart b/lib/pangea/analytics_misc/put_analytics_controller.dart index 0d099c0ee..6cf78acad 100644 --- a/lib/pangea/analytics_misc/put_analytics_controller.dart +++ b/lib/pangea/analytics_misc/put_analytics_controller.dart @@ -15,6 +15,7 @@ import 'package:fluffychat/pangea/common/utils/error_handler.dart'; import 'package:fluffychat/pangea/events/models/pangea_token_model.dart'; import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart'; import 'package:fluffychat/pangea/learning_settings/models/language_model.dart'; +import 'package:fluffychat/widgets/matrix.dart'; enum AnalyticsUpdateType { server, local } @@ -316,14 +317,16 @@ class PutAnalyticsController extends BaseController { /// Clears the local cache of recently sent constructs. Called before updating analytics void clearMessagesSinceUpdate({clearDrafts = false}) { if (clearDrafts) { - _pangeaController.pStoreService.delete(PLocalKey.messagesSinceUpdate); + MatrixState.pangeaController.getAnalytics.analyticsBox + .remove(PLocalKey.messagesSinceUpdate); return; } final localCache = _pangeaController.getAnalytics.messagesSinceUpdate; final draftKeys = localCache.keys.where((key) => key.startsWith('draft')); if (draftKeys.isEmpty) { - _pangeaController.pStoreService.delete(PLocalKey.messagesSinceUpdate); + MatrixState.pangeaController.getAnalytics.analyticsBox + .remove(PLocalKey.messagesSinceUpdate); return; } @@ -343,7 +346,7 @@ class PutAnalyticsController extends BaseController { final constructJsons = entry.value.map((e) => e.toJson()).toList(); formattedCache[entry.key] = constructJsons; } - await _pangeaController.pStoreService.save( + await MatrixState.pangeaController.getAnalytics.analyticsBox.write( PLocalKey.messagesSinceUpdate, formattedCache, ); diff --git a/lib/pangea/chat_list/utils/app_version_util.dart b/lib/pangea/chat_list/utils/app_version_util.dart index 46359e655..2e97c27ef 100644 --- a/lib/pangea/chat_list/utils/app_version_util.dart +++ b/lib/pangea/chat_list/utils/app_version_util.dart @@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:get_storage/get_storage.dart'; import 'package:http/http.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:universal_html/html.dart' as html; @@ -22,6 +23,8 @@ import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog. import 'package:fluffychat/widgets/matrix.dart'; class AppVersionUtil { + static final GetStorage _versionBox = GetStorage("version_storage"); + static Future _getAppVersion( String accessToken, ) async { @@ -148,7 +151,7 @@ class AppVersionUtil { ); if (!mandatoryUpdate && dialogResponse != OkCancelResult.ok) { - await MatrixState.pangeaController.pStoreService.save( + await _versionBox.write( PLocalKey.showedUpdateDialog, DateTime.now().toIso8601String(), ); @@ -210,8 +213,7 @@ class AppVersionUtil { } static DateTime? get showedUpdateDialog { - final entry = MatrixState.pangeaController.pStoreService - .read(PLocalKey.showedUpdateDialog); + final entry = _versionBox.read(PLocalKey.showedUpdateDialog); if (entry == null) return null; try { return DateTime.parse(entry); diff --git a/lib/pangea/chat_list/utils/chat_list_handle_space_tap.dart b/lib/pangea/chat_list/utils/chat_list_handle_space_tap.dart index afdd2f222..baa1e4c26 100644 --- a/lib/pangea/chat_list/utils/chat_list_handle_space_tap.dart +++ b/lib/pangea/chat_list/utils/chat_list_handle_space_tap.dart @@ -7,7 +7,6 @@ import 'package:matrix/matrix.dart'; import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/pages/chat_list/chat_list.dart'; import 'package:fluffychat/pangea/common/constants/local.key.dart'; -import 'package:fluffychat/pangea/common/controllers/pangea_controller.dart'; import 'package:fluffychat/pangea/extensions/pangea_room_extension.dart'; import 'package:fluffychat/widgets/adaptive_dialogs/show_ok_cancel_alert_dialog.dart'; import 'package:fluffychat/widgets/future_loading_dialog.dart'; @@ -20,7 +19,6 @@ void chatListHandleSpaceTap( ChatListController controller, Room space, ) { - final PangeaController pangeaController = MatrixState.pangeaController; void setActiveSpaceAndCloseChat() { controller.setActiveSpace(space.id); @@ -102,8 +100,9 @@ void chatListHandleSpaceTap( (element) => element.isSpace && element.membership == Membership.join, ); - final justInputtedCode = pangeaController.pStoreService - .read(PLocalKey.justInputtedCode, isAccountData: false); + final justInputtedCode = MatrixState + .pangeaController.classController.chatBox + .read(PLocalKey.justInputtedCode); if (rooms.any((s) => s.spaceChildren.any((c) => c.roomId == space.id))) { autoJoin(space); } else if (justInputtedCode != null && diff --git a/lib/pangea/common/controllers/pangea_controller.dart b/lib/pangea/common/controllers/pangea_controller.dart index 84fe22854..dd7f5d3a1 100644 --- a/lib/pangea/common/controllers/pangea_controller.dart +++ b/lib/pangea/common/controllers/pangea_controller.dart @@ -34,7 +34,6 @@ import 'package:fluffychat/widgets/matrix.dart'; import '../../../config/app_config.dart'; import '../../choreographer/controllers/it_feedback_controller.dart'; import '../utils/firebase_analytics.dart'; -import '../utils/p_store.dart'; class PangeaController { ///pangeaControllers @@ -56,7 +55,6 @@ class PangeaController { late PracticeActivityRecordController activityRecordController; ///store Services - late PStore pStoreService; final pLanguageStore = PangeaLanguage(); StreamSubscription? _languageStream; @@ -94,7 +92,6 @@ class PangeaController { /// Initialize controllers _addRefInObjects() { - pStoreService = PStore(pangeaController: this); userController = UserController(this); languageController = LanguageController(this); classController = ClassController(this); diff --git a/lib/pangea/common/utils/p_store.dart b/lib/pangea/common/utils/p_store.dart deleted file mode 100644 index 07ccb7bdd..000000000 --- a/lib/pangea/common/utils/p_store.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:get_storage/get_storage.dart'; - -import 'package:fluffychat/pangea/common/controllers/pangea_controller.dart'; - -/// Utility to save and read data both in the matrix profile (this is the default -/// behavior) and in the local storage (local needs to be specificied). An -/// instance of this class is created in the PangeaController. -class PStore { - final GetStorage _box = GetStorage(); - final PangeaController pangeaController; - - PStore({required this.pangeaController}); - - /// Saves the provided [data] with the specified [key] in the local storage. - /// - /// By default, the [data] is considered as account data, but you can set - /// [isAccountData] to false if it's not account-related data. - /// - /// Example usage: - /// ```dart - /// await save('user', {'name': 'John Doe', 'age': 25}); - /// ``` - Future save( - String key, - dynamic data, { - bool isAccountData = true, - }) async { - await _box.write(_key(key, isAccountData: isAccountData), data); - } - - /// Reads the value associated with the given [key] from the local store. - /// - /// If [isAccountData] is true, tries to find key assosiated with the logged in user. - /// Otherwise, it is read from the general store. - /// - /// Returns the value associated with the [key], or - /// null if the user ID is null or value hasn't been set. - dynamic read(String key, {bool isAccountData = true}) { - return pangeaController.matrixState.client.userID != null - ? _box.read(_key(key, isAccountData: isAccountData)) - : null; - } - - /// Deletes the value associated with the given [key] from the local store. - /// - /// If [isAccountData] is true (default), will try to use key assosiated with the logged in user's ID - /// - /// Returns a [Future] that completes when the value is successfully deleted. - /// If the user is not logged in, the value will not be deleted and the [Future] will complete with null. - Future delete(String key, {bool isAccountData = true}) async { - return pangeaController.matrixState.client.userID != null - ? _box.remove(_key(key, isAccountData: isAccountData)) - : null; - } - - /// Returns the key for storing data in the pangea store. - /// - /// The [key] parameter represents the base key for the data. - /// The [isAccountData] parameter indicates whether the data is account-specific. - /// If [isAccountData] is true, the account-specific key is returned by appending the user ID to the base key. - /// If [isAccountData] is false, the base key is returned as is. - String _key(String key, {bool isAccountData = true}) { - return isAccountData - ? pangeaController.matrixState.client.userID! + key - : key; - } -} diff --git a/lib/pangea/common/widgets/customized_svg.dart b/lib/pangea/common/widgets/customized_svg.dart index 3bba7e882..08f1ad53a 100644 --- a/lib/pangea/common/widgets/customized_svg.dart +++ b/lib/pangea/common/widgets/customized_svg.dart @@ -16,6 +16,7 @@ class CustomizedSvg extends StatelessWidget { /// Icon to show in case of error final Widget errorIcon; + static final GetStorage _svgStorage = GetStorage('svg_cache'); const CustomizedSvg({ super.key, required this.svgUrl, @@ -23,8 +24,6 @@ class CustomizedSvg extends StatelessWidget { this.errorIcon = const Icon(Icons.error_outline), }); - static final GetStorage _svgStorage = GetStorage('svg_cache'); - Future _fetchSvg() async { final cachedSvgEntry = _svgStorage.read(svgUrl); if (cachedSvgEntry != null && cachedSvgEntry is Map) { diff --git a/lib/pangea/login/pages/user_settings.dart b/lib/pangea/login/pages/user_settings.dart index fec3ed1b2..05be3b70b 100644 --- a/lib/pangea/login/pages/user_settings.dart +++ b/lib/pangea/login/pages/user_settings.dart @@ -80,8 +80,8 @@ class UserSettingsState extends State { } bool get isSSOSignup { - final loginTypeEntry = - _pangeaController.pStoreService.read(PLocalKey.loginType); + final loginTypeEntry = MatrixState.pangeaController.userController.loginBox + .read(PLocalKey.loginType); return loginTypeEntry is String && loginTypeEntry == 'sso'; } diff --git a/lib/pangea/login/utils/sso_login_action.dart b/lib/pangea/login/utils/sso_login_action.dart index f992e5c79..84418a5e5 100644 --- a/lib/pangea/login/utils/sso_login_action.dart +++ b/lib/pangea/login/utils/sso_login_action.dart @@ -62,6 +62,8 @@ Future pangeaSSOLoginAction( token: token, initialDeviceDisplayName: PlatformInfos.clientName, ); - MatrixState.pangeaController.pStoreService.save(PLocalKey.loginType, 'sso'); + + MatrixState.pangeaController.userController.loginBox + .write(PLocalKey.loginType, 'sso'); GoogleAnalytics.login(provider.name!, loginRes.userId); } diff --git a/lib/pangea/spaces/controllers/space_controller.dart b/lib/pangea/spaces/controllers/space_controller.dart index ded4079e6..94075f858 100644 --- a/lib/pangea/spaces/controllers/space_controller.dart +++ b/lib/pangea/spaces/controllers/space_controller.dart @@ -20,23 +20,25 @@ import '../../common/controllers/base_controller.dart'; class ClassController extends BaseController { late PangeaController _pangeaController; + //Storage Initialization + final GetStorage chatBox = GetStorage("chat_list_storage"); + final GetStorage linkBox = GetStorage("link_storage"); + static final GetStorage _classStorage = GetStorage('class_storage'); + ClassController(PangeaController pangeaController) : super() { _pangeaController = pangeaController; } - static final GetStorage _aliasStorage = GetStorage('alias_storage'); - void setActiveSpaceIdInChatListController(String? classId) { setState({"activeSpaceId": classId}); } Future joinCachedSpaceCode(BuildContext context) async { - final String? classCode = _pangeaController.pStoreService.read( + final String? classCode = linkBox.read( PLocalKey.cachedClassCodeToJoin, - isAccountData: false, ); - final String? alias = _aliasStorage.read(PLocalKey.cachedAliasToJoin); + final String? alias = _classStorage.read(PLocalKey.cachedAliasToJoin); if (classCode != null) { await joinClasswithCode( @@ -44,13 +46,12 @@ class ClassController extends BaseController { classCode, ); - await _pangeaController.pStoreService.delete( + await linkBox.remove( PLocalKey.cachedClassCodeToJoin, - isAccountData: false, ); } else if (alias != null) { await joinCachedRoomAlias(alias, context); - await _aliasStorage.remove(PLocalKey.cachedAliasToJoin); + await _classStorage.remove(PLocalKey.cachedAliasToJoin); } } @@ -65,7 +66,7 @@ class ClassController extends BaseController { final client = Matrix.of(context).client; if (!client.isLogged()) { - await _aliasStorage.write(PLocalKey.cachedAliasToJoin, alias); + await _classStorage.write(PLocalKey.cachedAliasToJoin, alias); context.go("/home"); return; } @@ -140,10 +141,9 @@ class ClassController extends BaseController { } final chosenClassId = foundClasses.first; - await _pangeaController.pStoreService.save( + await chatBox.write( PLocalKey.justInputtedCode, classCode, - isAccountData: false, ); return chosenClassId; }, diff --git a/lib/pangea/spaces/utils/join_with_link.dart b/lib/pangea/spaces/utils/join_with_link.dart index e412651ed..cfeab97df 100644 --- a/lib/pangea/spaces/utils/join_with_link.dart +++ b/lib/pangea/spaces/utils/join_with_link.dart @@ -40,10 +40,9 @@ class _JoinClassWithLinkState extends State { ); return; } - await pangeaController.pStoreService.save( + await MatrixState.pangeaController.classController.linkBox.write( PLocalKey.cachedClassCodeToJoin, classCode, - isAccountData: false, ); context.go("/home"); }); diff --git a/lib/pangea/subscription/controllers/subscription_controller.dart b/lib/pangea/subscription/controllers/subscription_controller.dart index 6cb7829b5..36d99abf4 100644 --- a/lib/pangea/subscription/controllers/subscription_controller.dart +++ b/lib/pangea/subscription/controllers/subscription_controller.dart @@ -7,6 +7,7 @@ import 'package:flutter/services.dart'; import 'package:collection/collection.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart'; +import 'package:get_storage/get_storage.dart'; import 'package:http/http.dart'; import 'package:purchases_flutter/purchases_flutter.dart'; import 'package:url_launcher/url_launcher_string.dart'; @@ -83,6 +84,7 @@ class SubscriptionController extends BaseController { await initialize(); } + final GetStorage subscriptionBox = GetStorage("subscription_storage"); Future _initialize() async { try { if (_userID == null) { @@ -122,11 +124,10 @@ class SubscriptionController extends BaseController { }, ); } else { - final bool? beganWebPayment = _pangeaController.pStoreService.read( - PLocalKey.beganWebPayment, - ); + final bool? beganWebPayment = + subscriptionBox.read(PLocalKey.beganWebPayment); if (beganWebPayment ?? false) { - await _pangeaController.pStoreService.delete( + await subscriptionBox.remove( PLocalKey.beganWebPayment, ); if (isSubscribed) { @@ -173,7 +174,7 @@ class SubscriptionController extends BaseController { selectedSubscription.duration!, isPromo: isPromo, ); - await _pangeaController.pStoreService.save( + await subscriptionBox.write( PLocalKey.beganWebPayment, true, ); @@ -274,7 +275,7 @@ class SubscriptionController extends BaseController { : SubscriptionStatus.dimissedPaywall; DateTime? get _lastDismissedPaywall { - final lastDismissed = _pangeaController.pStoreService.read( + final lastDismissed = subscriptionBox.read( PLocalKey.dismissedPaywall, ); if (lastDismissed == null) return null; @@ -282,7 +283,7 @@ class SubscriptionController extends BaseController { } int? get _paywallBackoff { - final backoff = _pangeaController.pStoreService.read( + final backoff = subscriptionBox.read( PLocalKey.paywallBackoff, ); if (backoff == null) return null; @@ -299,18 +300,18 @@ class SubscriptionController extends BaseController { } void dismissPaywall() async { - await _pangeaController.pStoreService.save( + await subscriptionBox.write( PLocalKey.dismissedPaywall, DateTime.now().toString(), ); if (_paywallBackoff == null) { - await _pangeaController.pStoreService.save( + await subscriptionBox.write( PLocalKey.paywallBackoff, 1, ); } else { - await _pangeaController.pStoreService.save( + await subscriptionBox.write( PLocalKey.paywallBackoff, _paywallBackoff! + 1, ); diff --git a/lib/pangea/subscription/models/base_subscription_info.dart b/lib/pangea/subscription/models/base_subscription_info.dart index b784efd94..207ee631e 100644 --- a/lib/pangea/subscription/models/base_subscription_info.dart +++ b/lib/pangea/subscription/models/base_subscription_info.dart @@ -92,6 +92,8 @@ class AvailableSubscriptionsInfo { List availableSubscriptions = []; SubscriptionAppIds? appIds; List? allProducts; + final subscriptionBox = + MatrixState.pangeaController.subscriptionController.subscriptionBox; AvailableSubscriptionsInfo({ this.appIds, @@ -113,14 +115,14 @@ class AvailableSubscriptionsInfo { } Future _cacheSubscriptionInfo() async { - await MatrixState.pangeaController.pStoreService.save( + await subscriptionBox.write( PLocalKey.availableSubscriptionInfo, toJson(), ); } - static AvailableSubscriptionsInfo? _getCachedSubscriptionInfo() { - final json = MatrixState.pangeaController.pStoreService.read( + AvailableSubscriptionsInfo? _getCachedSubscriptionInfo() { + final json = subscriptionBox.read( PLocalKey.availableSubscriptionInfo, ); if (json is! Map) { diff --git a/lib/pangea/user/controllers/user_controller.dart b/lib/pangea/user/controllers/user_controller.dart index a29a615d2..68cc8cebd 100644 --- a/lib/pangea/user/controllers/user_controller.dart +++ b/lib/pangea/user/controllers/user_controller.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'package:collection/collection.dart'; +import 'package:get_storage/get_storage.dart'; import 'package:jwt_decode/jwt_decode.dart'; import 'package:matrix/matrix.dart' as matrix; @@ -16,6 +17,7 @@ import '../models/user_model.dart'; /// Controller that manages saving and reading of user/profile information class UserController extends BaseController { + final GetStorage loginBox = GetStorage("login_storage"); late PangeaController _pangeaController; UserController(PangeaController pangeaController) : super() { _pangeaController = pangeaController; diff --git a/lib/pangea/user/utils/p_login.dart b/lib/pangea/user/utils/p_login.dart index e41a9e8f5..a925db8b5 100644 --- a/lib/pangea/user/utils/p_login.dart +++ b/lib/pangea/user/utils/p_login.dart @@ -79,7 +79,7 @@ Future _loginFuture({ } }, ); - MatrixState.pangeaController.pStoreService - .save(PLocalKey.loginType, 'password'); + MatrixState.pangeaController.userController.loginBox + .write(PLocalKey.loginType, 'password'); GoogleAnalytics.login("pangea", loginRes.userId); } diff --git a/pubspec.lock b/pubspec.lock index 6422835fb..491cc71ae 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -101,10 +101,10 @@ packages: dependency: "direct main" description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.11.0" audio_session: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.1" build_config: dependency: transitive description: @@ -229,10 +229,10 @@ packages: dependency: "direct main" description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.3.0" charcode: dependency: transitive description: @@ -269,18 +269,18 @@ packages: dependency: transitive description: name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.1.1" collection: dependency: "direct main" description: name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.19.1" + version: "1.19.0" colorize: dependency: transitive description: @@ -493,10 +493,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.1" fcm_shared_isolate: dependency: "direct main" description: @@ -516,10 +516,10 @@ packages: dependency: transitive description: name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" url: "https://pub.dev" source: hosted - version: "7.0.1" + version: "7.0.0" file_picker: dependency: "direct main" description: @@ -1391,18 +1391,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.7" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.8" leak_tracker_testing: dependency: transitive description: @@ -1471,10 +1471,10 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: @@ -1504,10 +1504,10 @@ packages: dependency: transitive description: name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.15.0" mgrs_dart: dependency: transitive description: @@ -1624,10 +1624,10 @@ packages: dependency: "direct main" description: name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -1752,10 +1752,10 @@ packages: dependency: transitive description: name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.6" + version: "3.1.5" platform_detect: dependency: transitive description: @@ -1832,10 +1832,10 @@ packages: dependency: transitive description: name: process - sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "5.0.2" proj4dart: dependency: transitive description: @@ -2213,10 +2213,10 @@ packages: dependency: transitive description: name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.10.1" + version: "1.10.0" sprintf: dependency: transitive description: @@ -2269,26 +2269,26 @@ packages: dependency: transitive description: name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" url: "https://pub.dev" source: hosted - version: "1.12.1" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.3.0" string_validator: dependency: transitive description: @@ -2341,34 +2341,34 @@ packages: dependency: transitive description: name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.2.1" test: dependency: transitive description: name: test - sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e" + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" url: "https://pub.dev" source: hosted - version: "1.25.15" + version: "1.25.8" test_api: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.3" test_core: dependency: transitive description: name: test_core - sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa" + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" url: "https://pub.dev" source: hosted - version: "0.6.8" + version: "0.6.5" text_to_speech: dependency: "direct main" description: @@ -2661,10 +2661,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "14.3.0" wakelock_plus: dependency: "direct main" description: @@ -2786,5 +2786,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.7.0-0 <4.0.0" + dart: ">=3.5.1 <4.0.0" flutter: ">=3.24.0"