diff --git a/CHANGELOG.md b/CHANGELOG.md index 08da5d9..7d9a7fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### 🐛 Bug Fixes +- **Routing**: Fix intermittent page title loss on web — Flutter's `Title` widget was overwriting TitleManager's route-level title on `didChangeDependencies()` rebuilds. Use `onGenerateTitle` to keep both in sync + ### 📦 Dependencies - **file_picker**: Upgrade from `^10.3.10` to `^11.0.2` — migrates to static API (`FilePicker.platform` removed). Includes Android path traversal security fix (CWE-22) and WASM web support diff --git a/lib/src/foundation/magic_app_widget.dart b/lib/src/foundation/magic_app_widget.dart index 86f1b91..b0cacf6 100644 --- a/lib/src/foundation/magic_app_widget.dart +++ b/lib/src/foundation/magic_app_widget.dart @@ -207,7 +207,7 @@ class _MagicApplicationState extends State { key: MagicAppWidget._appKey, themeMode: widget.themeMode, builder: (context) => MaterialApp.router( - title: widget.title, + onGenerateTitle: (_) => TitleManager.instance.effectiveTitle, theme: controller.toThemeData(), themeMode: widget.themeMode, locale: widget.locale ?? _getLocaleFromConfig(),