You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mobile/DOCUMENTATION.md
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1549,3 +1549,33 @@
1549
1549
-**Subscription Screen Integration**: Fully replaced standard SnackBars in `_restorePurchases`, `_purchase`, and mock plan purchase onTap with `SubscriptionAlertModal.show`.
1550
1550
-**Code Optimization**: Cleaned up unused `messenger` variables and optimized BuildContext usage across asynchronous gaps by leveraging `context.mounted` to silence linter warnings.
1551
1551
-**Verification**: Ran full `flutter analyze` ensuring zero issues or warnings remain in the codebase.
*Details*: Fixed a startup crash where a stale Supabase persisted session emitted `AuthApiException(message: Invalid Refresh Token: Refresh Token Not Found, code: refresh_token_not_found)` through `auth.onAuthStateChange`, triggering the global error modal.
1557
+
*Tech Notes*:
1558
+
-**Auth Provider**: Added an `onError` handler to the Supabase auth state stream in `auth_provider.dart`.
1559
+
-**Recovery Behavior**: Invalid persisted sessions now move the app to logged-out state and run a local sign-out cleanup instead of surfacing as an app crash.
1560
+
-**Lifecycle**: Stored and cancelled the auth stream subscription through `ref.onDispose()` to avoid duplicate listeners.
1561
+
-**Verification**: `flutter analyze` and `flutter test test/subscription_service_test.dart` completed successfully.
*Details*: Fixed the dashboard tutorial error `FormatException: It was not possible to obtain target position (Calendario Box)`, which could appear when the tutorial started while the calendar area was showing its empty state or before the welcome dialog transition had fully completed.
1567
+
*Tech Notes*:
1568
+
-**Dashboard UI**: Moved `_calendarBoxKey` to a stable wrapper around the entire calendar/empty-state area in `dashboard_screen.dart`, so the tutorial target is always mounted.
1569
+
-**Tutorial Timing**: Added a delayed post-frame tutorial start after the welcome modal closes.
1570
+
-**Safety**: Wrapped `TutorialCoachMark.show()` in a warning log guard so a missing target cannot surface as a global crash during review/test flows.
1571
+
-**Payment Test Result**: Confirmed from device logs that the annual sandbox subscription activates correctly: `matchedEntitlement=Evolve Pro`, `matchedProduct=com.simo.evolve.pro.yearly`, `activeSubscriptions=[com.simo.evolve.pro.yearly]`.
1572
+
-**Verification**: `flutter analyze` and `flutter test test/subscription_service_test.dart` completed successfully.
1573
+
1574
+
---
1575
+
1576
+
## [2026-05-19 15:30]: Consent - setState After Dispose Fix
1577
+
*Details*: Fixed a `setState() called after dispose()` crash in `ConsentScreen` that could occur after tapping Continue, because consent completion updates routing state and can unmount the screen before the async handler finishes.
1578
+
*Tech Notes*:
1579
+
-**Lifecycle Guard**: Added `mounted` checks after notification permission reads/requests and before clearing `_isLoading` in `_handleContinue()`.
1580
+
-**Root Cause**: The error is separate from the dashboard tutorial target issue; this one was caused by async consent/Sentry initialization completing after navigation away from the consent page.
1581
+
-**Verification**: `flutter analyze` and `flutter test test/subscription_service_test.dart` completed successfully.
0 commit comments