animated_switcher 1.0.1 copy "animated_switcher: ^1.0.1" to clipboard
animated_switcher: ^1.0.1 copied to clipboard

Simple widget switches with animation

Simple widget switches with animation

Usage #

class SomeWidget extends StatefulWidget {
  const SomeWidget({Key? key}) : super(key: key);

  @override
  State<SomeWidget> createState() => _SomeWidgetState();
}

class _SomeWidgetState extends State<SomeWidget> {
  bool switched = false;
  @override
  Widget build(BuildContext context) => Column(
    children: [
      animatedSwitch(Container(
        width: 100,
        height: 100,
        color: switched ? Colors.blue : Colors.red,
      ), 1000),
      SwitchListTile(
          value: switched,
          onChanged: (f) => setState(() {
            switched = f;
          }))
    ],
  );
}
0
likes
130
points
35
downloads

Publisher

verified publisherarcane.art

Weekly Downloads

Simple widget switches with animation

Repository (GitHub)

Documentation

API reference

License

GPL-3.0 (license)

Dependencies

flutter

More

Packages that depend on animated_switcher