@@ -5,16 +5,16 @@ import 'package:whitenoise/config/providers/active_account_provider.dart';
55const String _profileReadyCardDismissedKey = 'profile_ready_card_dismissed' ;
66
77class ProfileReadyCardVisibilityNotifier extends AsyncNotifier <bool > {
8- ProfileReadyCardVisibilityNotifier ({SharedPreferences ? sharedPreferences })
9- : injectedSharedPreferences = sharedPreferences ;
8+ ProfileReadyCardVisibilityNotifier ({SharedPreferences ? injectedSharedPreferences })
9+ : injectedSharedPreferences = injectedSharedPreferences ;
1010
11- late SharedPreferences sharedPreferences ;
11+ late SharedPreferences _sharedPreferences ;
1212 final SharedPreferences ? injectedSharedPreferences;
1313 String ? _currentPubKey;
1414
1515 @override
1616 Future <bool > build () async {
17- sharedPreferences = injectedSharedPreferences ?? await SharedPreferences .getInstance ();
17+ _sharedPreferences = injectedSharedPreferences ?? await SharedPreferences .getInstance ();
1818 final activeAccountPubkey = ref.watch (activeAccountProvider);
1919 _currentPubKey = activeAccountPubkey;
2020 return await _loadVisibilityState ();
@@ -26,7 +26,7 @@ class ProfileReadyCardVisibilityNotifier extends AsyncNotifier<bool> {
2626 return true ;
2727 }
2828 final isDismissed =
29- sharedPreferences .getBool ('${_profileReadyCardDismissedKey }_$_currentPubKey ' ) ?? false ;
29+ _sharedPreferences .getBool ('${_profileReadyCardDismissedKey }_$_currentPubKey ' ) ?? false ;
3030 return ! isDismissed;
3131 } catch (e) {
3232 return true ;
@@ -40,7 +40,7 @@ class ProfileReadyCardVisibilityNotifier extends AsyncNotifier<bool> {
4040 return ;
4141 }
4242
43- await sharedPreferences .setBool ('${_profileReadyCardDismissedKey }_$_currentPubKey ' , true );
43+ await _sharedPreferences .setBool ('${_profileReadyCardDismissedKey }_$_currentPubKey ' , true );
4444 state = const AsyncValue .data (false );
4545 } catch (e) {
4646 state = const AsyncValue .data (false );
@@ -54,7 +54,7 @@ class ProfileReadyCardVisibilityNotifier extends AsyncNotifier<bool> {
5454 return ;
5555 }
5656
57- await sharedPreferences .remove ('${_profileReadyCardDismissedKey }_$_currentPubKey ' );
57+ await _sharedPreferences .remove ('${_profileReadyCardDismissedKey }_$_currentPubKey ' );
5858 state = const AsyncValue .data (true );
5959 } catch (e) {
6060 state = const AsyncValue .data (true );
0 commit comments