Skip to content

Fix issues#1

Merged
aswin-blix merged 7 commits into
mainfrom
fix
Mar 30, 2026
Merged

Fix issues#1
aswin-blix merged 7 commits into
mainfrom
fix

Conversation

@aswin-blix

@aswin-blix aswin-blix commented Mar 30, 2026

Copy link
Copy Markdown
Owner

Summary

Type of Change

  • Bug fix
  • New feature
  • Refactor / code quality
  • Documentation
  • Other

Related Issue

Closes #

Testing

  • Tested on Android device
  • flutter analyze passes with no issues
  • No new warnings introduced

Screenshots (if UI changes)

Checklist

  • Code follows the project style (Plus Jakarta Sans, Riverpod providers, Hive adapters hand-written)
  • No sensitive data (keys, keystore, .env) committed
  • PR title follows type: short description format

Aswin Blix and others added 7 commits March 30, 2026 12:27
- Add AppLogger utility (debug prints info/warn/error with tag; errors
  always printed, info/warn only in debug builds)
- Wrap _save() in try/catch — on failure: resets _isSaving, reverses
  button animation, shows red snackbar with the actual error message
- Add mounted checks before every setState/Navigator call after awaits
- Log transaction save attempts and results in TransactionNotifier
- Log settings update failures in SettingsNotifier
- Both notifiers rethrow so the UI catch block receives the error
- Error snackbar is floating, red, rounded, with an error icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Root cause: notification toggle saved the preference but no code ever
scheduled or delivered a notification.

Changes:
- NotificationService singleton (lib/core/services/notification_service.dart)
  · Initializes FlutterLocalNotificationsPlugin with ic_launcher icon
  · Initializes timezone data (timezone package)
  · requestPermission() — POST_NOTIFICATIONS via permission_handler
  · scheduleDailyReminder(hour, minute) — exact daily zonedSchedule with
    DateTimeComponents.time so it repeats every day; if time already
    passed today it schedules for tomorrow
  · cancelDailyReminder() / cancelAll()
  · All ops wrapped in try/catch with AppLogger.e on failure

- main.dart: init NotificationService on startup; reschedule reminder if
  it was previously enabled (survives app restart / reboot)

- settings_screen.dart:
  · Notification toggle → _toggleNotification(): requests permission,
    saves setting, schedules/cancels, shows confirmation snackbar
  · Time picker → _pickTime(): saves new time and reschedules if enabled

- AndroidManifest.xml:
  · Added SCHEDULE_EXACT_ALARM + USE_EXACT_ALARM permissions
  · Added ScheduledNotificationBootReceiver (reschedules after reboot)
  · Added ScheduledNotificationReceiver (delivers alarms)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Analytics week tab now uses rolling last 7 days instead of
  current Mon–Sun calendar week, fixing 0 values when transactions
  predate this Monday
- Dashboard light mode gets a tinted accent gradient header wrapping
  the greeting + balance card, eliminating the blank top area
- Onboarding back button added (shows on pages 2 & 3)
- Onboarding name page uses SingleChildScrollView so keyboard no
  longer overlaps the input field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cast List? instead of List to avoid runtime null errors when
reading older Hive records that may have missing list fields.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add flutter_timezone package to resolve the correct local timezone
  at runtime so zonedSchedule fires at the right local time on all
  devices/regions
- Upgrade notification priority to max and add fullScreenIntent,
  category: reminder, and public visibility for better delivery on
  Android 13+ and aggressive battery-saving ROMs (OnePlus, Xiaomi, etc.)
- Switch to inexactAllowWhileIdle for broader Android compatibility
- Add USE_FULL_SCREEN_INTENT permission to AndroidManifest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-generated files updated after adding flutter_timezone dependency.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CHANGELOG: add v1.1.0 entry covering all fixes (analytics week tab,
  light mode header, onboarding UX, notification reliability, Hive
  null-safety)
- README: add flutter_timezone to tech stack, USE_FULL_SCREEN_INTENT
  to permissions table, and architecture notes for timezone scheduling
  and rolling week window
- docs/index.html: bump softwareVersion to 1.1.0, add flutter_timezone
  badge, update analytics feature description
- pubspec.yaml: bump version to 1.1.0+2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@aswin-blix aswin-blix merged commit 993ff59 into main Mar 30, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant