Search packages, repositories and app categories

Package detailsv0.1.0

thememode_selector

A widget to select between light and dark ThemeMode (in development, but working fine)

30-day downloads
16
Likes
46
Pub points
40

Install package

flutter pub add thememode_selector

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter widget that enables users to easily switch between light and dark theme modes. Designed for simplicity and integration, it provides a clean interface for theme selection without requiring complex configuration. Currently in development but functional and stable for basic use cases. Ideal for apps aiming to support user preference for light or dark appearance. The package is open-source and hosted on GitHub for transparency and community contributions.

Use cases

  • Enabling user-controlled light/dark theme switching
  • Integrating theme preferences in app settings
  • Supporting accessibility through customizable themes
  • Building responsive UIs with dynamic theming
  • Creating consistent design experiences across devices

Key features

  • Simple, intuitive widget for theme selection
  • Supports both light and dark ThemeMode
  • Open-source and actively maintained
  • Minimal setup required
  • Works seamlessly with Flutter's theme system

Suitable for

  • Developers building apps with theme customization
  • Apps targeting accessibility and user preference
  • Projects using Flutter's built-in theming
  • Teams wanting lightweight theme management
  • Frontend developers focused on UX consistency

Considerations

  • Not yet fully stable (in development)
  • Limited to light/dark mode only
  • No additional theme presets available
  • Platform-specific behavior may vary
  • Requires manual handling of persisted theme state

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

ThemeModeSelector Widget

I am currently working with the concept of Theme's in Flutter and I wanted to build a widget which would allow me to switch between light and dark themes. Seeking a design for a simple toggle, I was lucky enough to stumble into some of Zhenya Karapetyan's amazing work on Dribbble. Zhenya's simple yet fun design of a toggle component would look very nice in Flutter, and it has some really cool animations which I wanted to learn.

Zhenya Karapetyan's Light/Dark Toggle

https://dribbble.com/shots/7635203-Light-Dark-mode-toggle-switcher/attachments/396864?mode=media

thememode_selector

A widget to toggle between a light or dark ThemeMode

Features

  • Configurable colors for background and foreground colors for both light and dark modes
  • API similar to standard Material Slider widget

Supported Platforms

  • Flutter Android
  • Flutter iOS
  • Flutter Web
  • Flutter Desktop

Installation

Add thememode_selector: ^0.1.0 to your pubspec.yaml configuration.

import 'package:thememode_selector/thememode_selector.dart'

How to use

Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text(title),
    ),
    body: Center(
      child: ThemeModeSelector(
        height: 39,
        onChanged: (mode) {
          print('ThemeMode changed to $mode');
          ThemeModeManager.of(context)!.themeMode = mode;
        },
      ),
    ),
  );
}

License

MIT

Categories

Source repository

Projects using this package

No data available yet.