style: apply dart format across project
This commit is contained in:
@@ -86,12 +86,12 @@ class NotificationProvider extends ChangeNotifier {
|
||||
try {
|
||||
_isEnabled = value;
|
||||
await NotificationService.setNotificationEnabled(value);
|
||||
|
||||
|
||||
// 첫 권한 부여 시 기본 설정 적용
|
||||
if (value) {
|
||||
await initializeDefaultSettingsOnFirstPermission();
|
||||
}
|
||||
|
||||
|
||||
notifyListeners();
|
||||
} catch (e) {
|
||||
debugPrint('알림 활성화 설정 중 오류 발생: $e');
|
||||
@@ -270,15 +270,17 @@ class NotificationProvider extends ChangeNotifier {
|
||||
// 첫 권한 부여 시 기본 설정 초기화
|
||||
Future<void> initializeDefaultSettingsOnFirstPermission() async {
|
||||
try {
|
||||
final firstGranted = await _secureStorage.read(key: _firstPermissionGrantedKey);
|
||||
final firstGranted =
|
||||
await _secureStorage.read(key: _firstPermissionGrantedKey);
|
||||
if (firstGranted != 'true') {
|
||||
// 첫 권한 부여 시 기본값 설정
|
||||
await setReminderDays(2); // 2일 전 알림
|
||||
await setDailyReminderEnabled(true); // 반복 알림 활성화
|
||||
await setPaymentEnabled(true); // 결제 예정 알림 활성화
|
||||
|
||||
|
||||
// 첫 권한 부여 플래그 저장
|
||||
await _secureStorage.write(key: _firstPermissionGrantedKey, value: 'true');
|
||||
await _secureStorage.write(
|
||||
key: _firstPermissionGrantedKey, value: 'true');
|
||||
}
|
||||
} catch (e) {
|
||||
debugPrint('기본 설정 초기화 중 오류 발생: $e');
|
||||
|
||||
Reference in New Issue
Block a user