pkg_dark_mode version: 0.3.8

Published 2025-09-04

ruud

sdk | dart flutter
repository | svn
platform | generic
status | n/a
  • Readme
  • Changelog
  • Versions

Dark Mode

Widgets and models to toggle between light and dark mode.

graph

Usage

Wrap a provider for the HHDarkModeModel, and a consumer, in your application widget:

class YourApp extends StatelessWidget {
  const YourApp({final Key? key}) : super(key: key);

  @override
  Widget build(final BuildContext context) =>
      HHProvider<HHDarkModeModel>(
        create: (final _) => HHDarkModeModel(),
        child: HHConsumer<HHDarkModeModel>(
          builder: (final context, final darkModeModel, final child) => MaterialApp(
            title: kApplicationTitle,
            theme: ThemeData.light(),
            darkTheme: ThemeData.dark(),
            themeMode: darkModeModel.mode,
            debugShowCheckedModeBanner: false,
            home: ... your home page ...,
          ),
        ),
      );
}

Use the HHDarkModeToggleButton somewhere to toggle between light/dark mode.

@override
Widget build(final BuildContext context) =>
  Scaffold(
    appBar: AppBar(
    title: Text(widget.title),
    actions: [
      const HHDarkModeToggleButton(),
    ],
  ),
  body: ... your home page body ...

Changelog

0.3.8 - 2025-09-04

Fixed

  • Unawaited futures.

0.3.7 - 2025-05-28

Changed

  • Version bump from 0.3.6 to 0.3.7 (flutter_lints -> 6.0.0 (was 5.0.0)).

0.3.6 - 2024-12-19

Changed

  • Version bump from 0.3.5 to 0.3.6 (Support Apple silicon (arm64)).

0.3.5 - 2024-08-22

Changed

  • Version bump from 0.3.4 to 0.3.5 (SDK update 3.5.1).

0.3.4 - 2024-04-16

Added

  • HHDarkModeModel.isSystemDarkmode to test if the operating system is in dark mode.

0.3.3 - 2024-04-11

Added

  • HHDarkModeToggleButton.color.

0.3.2 - 2024-02-01

Changed

  • Version bump from 0.3.1 to 0.3.2 (Resolve package version confusions).

0.3.1 - 2023-12-01

Removed

  • inAppBar flag on HHDarkModeToggleButton.

0.3.0 - 2023-10-02

Changed

  • Renamed DarkModeToggleButton to HHDarkModeToggleButton.
  • Renamed ThemeModel to HHDarkModeModel.

0.2.0 - 2023-09-18

Removed

  • StorageManager class and replaced with HHPreferences from pkg_core.

0.1.3 - 2023-04-14

Changed

  • Version bump from 0.1.2 to 0.1.3 (Due to pkg_state_management).

0.1.2 - 2023-04-13

Fixed

  • await unawaited futures.
  • Marked some futures unawaited.

0.1.1 - 2023-02-09

Changed

  • Version bump from 0.1.0 to 0.1.1 (Version confusion after compiler bug chaos).

0.1.0 - 2023-01-19

Removed

  • provider dependency.

0.0.10 - 2022-12-27

Changed

  • Version bump from 0.0.9 to 0.0.10.

0.0.9 - 2022-12-22

Changed

  • Version bump from 0.0.8 to 0.0.9.

0.0.8 - 2022-12-22

Changed

  • Version bump from 0.0.7 to 0.0.8 (Recompile due to installer optimizations).

0.0.7 - 2022-10-19

Fixed

  • Wrong version number in CHANGELOG.md.

0.0.6 - 2022-10-19

Changed

  • Removed all print statements for logging.

0.0.5 - 2022-10-11

Changed

  • Version bump from 0.0.4 to 0.0.5 (Recompile due to wrong GetIt.instance syntax.).

0.0.4 - 2022-10-05

Changed

  • Version bump from 0.0.3 to 0.0.4 (fixed pdflib searchpath macos crash).

0.0.3 - 2022-10-01

Changed

  • Version bump from 0.0.2 to 0.0.3 (pkg_pdflib bundle macos dylib).

0.0.2 - 2022-09-29

Changed

  • Version bump from 0.0.1 to 0.0.2 (dependencies upgraded).

0.0.1 - 2022-08-01

Changed

  • Initial version.

0.3.8

2025-09-04 download

0.3.7

2025-05-28 download

0.3.6

2024-12-19 download

0.3.5

2024-08-22 download

0.3.4

2024-04-16 download

0.3.3

2024-04-11 download

0.3.2

2024-02-01 download

0.3.1

2023-12-01 download

0.3.0

2023-10-02 download

0.2.0

2023-09-18 download

0.1.3

2023-04-14 download

0.1.2

2023-04-13 download

0.1.1

2023-02-09 download

0.1.0

2023-01-19 download

0.0.10

2022-12-27 download

0.0.9

2022-12-22 download

0.0.8

2022-12-22 download

0.0.7

2022-10-19 download

0.0.6

2022-10-19 download

0.0.5

2022-10-11 download

0.0.4

2022-10-05 download

0.0.3

2022-10-01 download

0.0.2

2022-09-29 download

0.0.1

2022-08-01 download