animated_theme_switcher
2.0.10, released 3 years ago by kherel.com
Flutter widget for animated theme switching
WASM-ready
What it does
Provides ThemeProvider, ThemeSwitchingArea, and ThemeSwitcher widgets to animate theme changes. It supports custom clippers and callbacks.
AI-written summary of version 2.0.10, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a smooth theme transition in a Flutter app
- You want to avoid manual animation code for theme changes
Skip it when
- You need persistent theme storage (use shared_preferences separately)
- You target web without CanvasKit
Strengths
- Easy to integrate with existing MaterialApp
- Supports custom animation offsets and callbacks
- No code generation required
Weaknesses
- Does not persist theme selection
- Web support requires CanvasKit
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency and wrap MaterialApp with ThemeProvider
import 'package:animated_theme_switcher/animated_theme_switcher.dart';
ThemeProvider(
initTheme: ThemeData.light(),
builder: (context, theme) => MaterialApp(
theme: theme,
home: Scaffold(body: ThemeSwitchingArea(child: Text('Hello'))),
),
);Alternatives
Packages that do the same job and could replace animated_theme_switcher.
- stacked_themes
Manage multiple themes, dark mode, and theme persistence in Flutter applications.
74Compare - xdg_icons
XDG theme icons for Flutter.
62Compare - random_color_scheme
Generates random light and dark Material Design color schemes respecting WCAG guidelines.
57Compare