animator 3.3.0 copy "animator: ^3.3.0" to clipboard
animator: ^3.3.0 copied to clipboard

A Flutter library that makes animation easer. It allows for separation of animation setup from the User Interface.

example/lib/main.dart

import 'package:example/basic_animatio_3/main.dart';
import 'package:flutter/material.dart';
import 'basic_animation_0/main.dart';
import 'basic_animation_1/main.dart';
import 'basic_animation_2/nested_animator.dart';
// import 'basic_animation_2/nested_animator.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animator Demo',
      home: Scaffold(
        appBar: AppBar(
          title: Text("Animator demo"),
        ),
        body: MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  goto(Widget page, BuildContext context) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => page,
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          ElevatedButton(
            child: Text("Basic Animation 0"),
            onPressed: () => goto(BasicAnimation0(), context),
          ),
          ElevatedButton(
            child: Text("Basic Animation 1"),
            onPressed: () => goto(BasicAnimation1(), context),
          ),
          ElevatedButton(
            child: Text("Basic Animation 2"),
            onPressed: () => goto(MyCustomPainterAnimation(), context),
          ),
          ElevatedButton(
            child: Text("Implicit animation"),
            onPressed: () => goto(BasicAnimation3(), context),
          ),
        ],
      ),
    );
  }
}
244
likes
150
points
3.99k
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter library that makes animation easer. It allows for separation of animation setup from the User Interface.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, states_rebuilder

More

Packages that depend on animator