Skip to content

v0.8.0 - Theme Toggle Control Feature

Choose a tag to compare

@pillowsoft pillowsoft released this 03 Oct 22:23
· 54 commits to main since this release

🎨 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 showThemeToggle parameter to AppConfig
  • Defaults to true for backwards compatibility
  • When set to false, hides the DarkModeToggleButton from 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: Added showThemeToggle parameter
  • app_shell.dart: Added conditional rendering logic
  • app_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