style: apply dart format across project

This commit is contained in:
JiWoong Sul
2025-09-07 19:33:11 +09:00
parent f812d4b9fd
commit d1a6cb9fe3
101 changed files with 3123 additions and 2574 deletions

View File

@@ -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');