Skip to main content

codifyiq_brightness_button 2.0.0 copy "codifyiq_brightness_button: ^2.0.0" to clipboard
codifyiq_brightness_button: ^2.0.0 copied to clipboard

A Light, Dark, and System theme toggle button for Flutter, built on the AdaptiveTheme package.

codifyiq_brightness_button #

pub package

A simple wrapper around AdaptiveTheme to toggle between Light, Dark, and System brightness modes. Drop it into an AppBar or settings screen, or into a menu you already have.

Demo #

Select the image for a quick walkthrough: Watch the brightness button in action

Installation #

dependencies:
  codifyiq_brightness_button: ^2.0.0

Usage #

import 'package:codifyiq_brightness_button/codifyiq_brightness_button.dart';

AppBar(actions: const [BrightnessButton()]);

Already have an account or overflow menu? Add the choice as a submenu instead:

MenuAnchor(
  menuChildren: const [BrightnessSubmenu()],
  builder: (context, controller, child) => IconButton(
    icon: const Icon(Icons.account_circle),
    onPressed: controller.open,
  ),
);

Or spread the three items straight into the menu with ...brightnessMenuItems(context). Every label can be overridden, e.g. for localization.

Your app must be wrapped in AdaptiveTheme (see the adaptive_theme setup) for the toggle to take effect.


Part of the CodifyIQ component family · pub.dev/publishers/codifyiq.com

0
likes
160
points
64
downloads

Documentation

API reference

Publisher

verified publishercodifyiq.com

Weekly Downloads

A Light, Dark, and System theme toggle button for Flutter, built on the AdaptiveTheme package.

Repository (GitHub)
View/report issues

Topics

#codifyiq #ui #widget #theme

License

MIT (license)

Dependencies

adaptive_theme, flutter, material_ui

More

Packages that depend on codifyiq_brightness_button