Skip to content

AnimateCon is a lightweight and easy-to-use flutter animation container.

License

Notifications You must be signed in to change notification settings

flutterkit/AnimateCon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AnimateCon

AnimateCon is a lightweight and easy-to-use Flutter animation container that enables developers to effortlessly implement zooming, panning, and rotating animations. By utilizing AnimateCon, developers can seamlessly create complex and engaging animations within Flutter applications, thereby enhancing the overall user experience and making the interface more dynamic and interactive.

Installation

Install the AnimateCon

You should ensure that you add the following dependency in your Flutter project.

dependencies:
  animatecon: latest

install packages from the command line:

flutter packages get

Useage

import class

import 'package:animatecon/animatecon.dart';

use AnimateCon

// add animate container
body: Center(
        child: AnimateCon(
          key: _key,
          initProp: const {"alpha": 0},
          child: Container(
            width: 200,
            height: 200,
            color: Colors.blue,
          )
        ),
      ),

/// control animate
final GlobalKey<AnimateConState> _key = GlobalKey<AnimateConState>();
bool _btnEnabled = true;

void _animate() {
    if (!_btnEnabled) return;
    _key.currentState!.animate({"y": 100, "alpha": 0.0}, {"y": 0.0, "alpha": 1.0},
        time: 500, ease: animateEase.back.easeOut, onComplete: () {
      _btnEnabled = true;
    });
    _btnEnabled = false;
}

/// animate scale position alpha props
_key.currentState!.animate({"y": 100, "scale": 0.0}, {"y": 0.0, "scale": 1.0},
        time: 500, ease: animateEase.back.easeOut);

/// stop animate
_key.currentState!.stop();

License

AnimateCon is licensed under MIT license. View license.https://github.com/flutterkit/AnimateCon/blob/master/LICENSE

About

AnimateCon is a lightweight and easy-to-use flutter animation container.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages