gt_theme 1.1.0
gt_theme: ^1.1.0 copied to clipboard
A production-ready Flutter theme management package with Material 3 & Cupertino support, system theme detection, light/dark mode switching, and theme persistence via SharedPreferences.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.0 - 2026-06-20 #
Changed #
- Updated SDK compatibility constraints to target Flutter 3.44.2 and Dart 3.12.2 (environment SDK ">=3.0.0 <4.0.0", flutter ">=3.44.2").
- Migrated iOS integration to natively support Swift Package Manager (SPM) according to the latest Flutter standard, replacing CocoaPods dependency management.
1.0.0 - 2025-12-27 #
Added #
-
ThemeService - Production-ready singleton service for theme management
- Material 3 light and dark themes with
ColorScheme.fromSeed - Cupertino light and dark themes
- System brightness detection without BuildContext
- Theme mode persistence via SharedPreferences
- ValueNotifier-based reactive updates for minimal rebuilds
- Material 3 light and dark themes with
-
ThemeConsumer - Widget for efficient theme consumption with child optimization
-
ThemeModeSelector - Ready-to-use UI widget for theme mode selection (Light/Dark/System)
-
BrightnessIndicator - Widget displaying current system brightness
-
ThemeInfoCard - Widget showing detailed theme information (mode, system brightness, effective brightness)
Features #
- Zero-dependency state management (works with GetX, Provider, Bloc, Riverpod, or none)
- Context-free system brightness listening via
WidgetsBindingObserver - Cached ThemeData for optimal performance
- Full Material 3 design system support
- Complete Cupertino design system support