flutter_curve 1.0.0 copy "flutter_curve: ^1.0.0" to clipboard
flutter_curve: ^1.0.0 copied to clipboard

flutter_curve is to create physics-based animations, to drive animation by curve.

flutter_curve #

Flutter Curve library is inspired by Dynamic.js

To see some demos, check out flutter_curve_web.

flutter_curve is to create physics-based animations, to drive animation by curve.

This library lets you easy to customize your physics-based curve animation.

Example #

Use them like you use Curve, because flutter_curve is a subclass of Curve.

Like this:


late final animation = CurvedAnimation(
  parent: _controller,
  curve: CubicCurve.easeIn(frition: 30),
);

final scrollController = ScrollController();

scrollController.animateTo(0, duration: const Duration(milliseconds: 500),
curve: CubicCurve.easeIn(frition: 30));

Usage #

1. add dependencies into you project pubspec.yaml file

dependencies:
  flutter_curve: ^1.0.0

Run flutter packages get in the root directory of your app.

2. import flutter_curve lib

import 'package:flutter_curve/flutter_curve.dart';

3. use flutter_curve


late final _controller = AnimationController(
  vsync: this,
  duration: widget.duration,
);

late final animation = CurvedAnimation(
  parent: _controller,
  curve: CubicCurve.easeIn(frition: 30),
);

Support Curve #

  • SpringCurve
  • CubicCurve.easeIn
  • CubicCurve.easeOut
  • CubicCurve.easeInOut
  • BounceCurve
  • GravityCurve
  • ForceWithGravityCurve
2
likes
130
pub points
44%
popularity

Publisher

unverified uploader

flutter_curve is to create physics-based animations, to drive animation by curve.

Repository (GitHub)
View/report issues

Topics

#animation #ui #effects #curve #widget

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_curve