animated_check 1.0.3 copy "animated_check: ^1.0.3" to clipboard
animated_check: ^1.0.3 copied to clipboard

outdated

A simple animated check icon widget for Flutter

example/lib/main.dart

import 'package:animated_check/animated_check.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Rounded Loading Button Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Rounded Loading Button Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage>
    with SingleTickerProviderStateMixin {
  AnimationController _animationController;
  Animation<double> _animation;

  @override
  void initState() {
    super.initState();

    _animationController =
        AnimationController(vsync: this, duration: Duration(seconds: 1));

    _animation = new Tween<double>(begin: 0, end: 1).animate(
        new CurvedAnimation(
            parent: _animationController, curve: Curves.easeInOutCirc));
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text("Animated Check Example"),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Container(
                  child: AnimatedCheck(
                progress: _animation,
                size: 200,
              )),
              TextButton(
                  child: Text("Check"),
                  onPressed: _animationController.forward),
              TextButton(
                  child: Text("Reset"), onPressed: _animationController.reset)
            ],
          ),
        ));
  }
}
32
likes
0
pub points
91%
popularity

Publisher

verified publisheredgington.dev

A simple animated check icon widget for Flutter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on animated_check