Repository navigation
v0.8.0 - Theme Toggle Control Feature
🎨 Theme Toggle Control Feature
This release introduces the ability to control the visibility of the theme toggle button in the app bar.
New Features
AppConfig.showThemeToggle Parameter
- Added optional
showThemeToggleparameter toAppConfig - Defaults to
truefor backwards compatibility - When set to
false, hides theDarkModeToggleButtonfrom the app bar - Perfect for apps with Settings-based theme switching
Usage Example
runShellApp(
appConfig: AppConfig(
title: 'My App',
routes: routes,
showThemeToggle: false, // Hide header theme toggle
),
);Benefits
- Eliminates visual clutter for apps with Settings-based theme controls
- Maintains backwards compatibility (defaults to showing toggle)
- Provides cleaner app bar for apps that prefer Settings-only theme switching
- No breaking changes - fully optional parameter
Files Changed
app_config.dart: AddedshowThemeToggleparameterapp_shell.dart: Added conditional rendering logicapp_shell_runner.dart: Pass parameter to AppShell
Full Changelog: https://github.com/pillowsoft/flutter_ps_app_shell/blob/main/packages/flutter_app_shell/CHANGELOG.md