Skip to content
pubscout

animated_theme_switcher

2.0.10, released 3 years ago by kherel.com

Flutter widget for animated theme switching

WASM-ready
$ flutter pub add animated_theme_switcher
Source repository

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.