arc_animator 0.1.1 copy "arc_animator: ^0.1.1" to clipboard
arc_animator: ^0.1.1 copied to clipboard

A flutter package to animate a widget on a circular path (arc)

Arc Animator #

A flutter package to animate a widget on a circular path (arc)

Getting Started #

You need a basic understanding of Flutter animation to follow along.

 @override
  void initState() {
    controller = AnimationController(
        vsync: this, duration: Duration(milliseconds: 600));
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
  
    final size = MediaQuery.of(context).size;
    
    return Material(
      child: Stack(
        children: [
          ArcAnimator(
            curve: Curves.easeInOutSine,
            begin: Offset(60, 60),
            end: Offset(size.width - 60, size.height - 60),
            controller: controller,
            statusListener: (status) => print(status),
            offsetChanging: (offset) => print(offset),
            child: FloatingActionButton(
              onPressed: () => controller.forward(), // You don't need controller.reverse()
            ),
          )
        ],
      ),
    );
  }
10
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A flutter package to animate a widget on a circular path (arc)

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on arc_animator