gt_theme library

GT Theme - A production-ready Flutter theme management package.

This package provides a complete theme management solution with:

  • Material 3 and Cupertino theme support
  • System theme detection and real-time sync
  • Light/Dark/System mode switching
  • Theme persistence via SharedPreferences
  • Zero-dependency state management (works with any or no state management)
  • Minimal widget rebuilds using ValueNotifier

Quick Start

import 'package:gt_theme/gt_theme.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  ThemeService.instance.startListening();
  runApp(MyApp());
}

Widgets Included

Classes

BrightnessIndicator
BrightnessIndicator widget that displays the current system brightness.
ThemeConsumer
ThemeConsumer widget for efficiently consuming theme data with minimal rebuilds.
ThemeInfoCard
ThemeInfoCard widget that displays current theme information.
ThemeModeSelector
ThemeModeSelector widget for switching between light, dark, and system themes.
ThemeService
Ultra-optimized, zero-dependency, production-ready global theme service.