animated 1.0.1

Flutter Android iOS web

A very simple (yet powerful) implicit animation library for Flutter.

example/main.dart

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

class Example extends StatefulWidget {
  @override
  _ExampleState createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  bool scaled = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: GestureDetector(
        onTap: () {
          setState(() {
            scaled = !scaled;
          });
        },
        child: Animated(
          value: scaled ? 1 : 0.5,
          curve: Curves.easeInOut,
          duration: Duration(milliseconds: 300),
          builder: (context, child, animation) => Transform.scale(
            scale: animation.value,
            child: child,
          ),
          child: Container(
            width: 40,
            height: 40,
            color: Colors.red,
          ),
        ),
      ),
    );
  }
}
1
likes
100
pub points
75%
popularity

A very simple (yet powerful) implicit animation library for Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ncabasso@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on animated