Skip to content

v1.0.7 - Fix Cupertino Theme Updates & Persistence

Choose a tag to compare

@pillowsoft pillowsoft released this 04 Oct 11:00
· 39 commits to main since this release

Fixed

  • Cupertino Theme Updates: Fixed CupertinoApp not updating UI when theme mode changes. Added ValueKey based on brightness to force proper widget rebuilds when switching between light/dark/system modes.
  • Theme Persistence: Fixed SharedPreferences persistence effects by adding proper error handling to async operations. Effects now capture values before saving and log any persistence failures.

Technical Details

  • Compute currentBrightness once at top of Watch block for consistent dependency tracking
  • Added key: ValueKey('cupertino_$currentBrightness') to CupertinoApp.router to force rebuild when brightness changes
  • Use brightness value computed in Watch body instead of calling getCurrentBrightness() in CupertinoThemeData constructor
  • All SharedPreferences effects now use .catchError() to handle and log any persistence failures
  • Effects capture signal values before async operations to ensure proper reactivity

What's Changed

This release fixes critical issues where theme changes in Cupertino UI system didn't update the UI immediately and didn't persist across app restarts.

Full Changelog: v1.0.6...v1.0.7