codifyiq_brightness_button
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:

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
Libraries
- A Light / Dark / System theme toggle button built on AdaptiveTheme.