sa_anicoto 0.0.2 copy "sa_anicoto: ^0.0.2" to clipboard
sa_anicoto: ^0.0.2 copied to clipboard

discontinuedreplaced by: simple_animations
outdated

Anicoto (part of Simple Animations Framework) enriches your developing expierience with Flutter`s AnimationController.

example/example.md

📝 Examples #

🛈 Note: These examples uses supercharged for syntactic sugar.

Basic usage pattern #

This example shows a complete app that uses AnimationMixin in a simple way.

import 'package:flutter/material.dart';
import 'package:simple_animations/simple_animations.dart';
import 'package:supercharged/supercharged.dart';

void main() => runApp(MaterialApp(home: Page()));

class Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SafeArea(child: Center(child: MyAnimatedWidget())),
    );
  }
}

class MyAnimatedWidget extends StatefulWidget {
  @override
  _MyAnimatedWidgetState createState() => _MyAnimatedWidgetState();
}

class _MyAnimatedWidgetState extends State<MyAnimatedWidget>
    with AnimationMixin {  // Add AnimationMixin to state class

  Animation<double> size; // Declare animation variable

  @override
  void initState() {
    size = 0.0.tweenTo(200.0).animatedBy(controller); // Connect tween and controller and apply to animation variable
    controller.play(); // Start the animation playback
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: size.value, // Use animation variable's value here 
      height: size.value, // Use animation variable's value here
      color: Colors.red
    );
  }
}
12
likes
0
pub points
30%
popularity

Publisher

verified publisherfelix-blaschke.de

Anicoto (part of Simple Animations Framework) enriches your developing expierience with Flutter`s AnimationController.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, supercharged

More

Packages that depend on sa_anicoto