A Flutter package that is used to create trim path animation on given path.
- start point tween
- end point tween
- offset tween
- Support non-continuous path
AnimatedPathwidget is used to animated
AnimatedPath( animation: animationController.view, path: Path() ..moveTo(100, 100) ..relativeLineTo(400, 0) ..relativeLineTo(0, 400) ..relativeLineTo(-400, 0) ..relativeLineTo(0, -400), paint: paint, start: Tween(begin: 0.0, end: 0.7), end: Tween(begin: 0.0, end: 1.0), offset: Tween(begin: 0.0, end: 0.3), )
- Provide initial and final value of
Tween(begin: 0.0, end: 1.0)
This will put the
start of the
path at (0.0 *
pathLength) (initially) and at (1.0 *
path for values between
1 (inclusive) will be visible only However, one can provide values
< 0 or
> 1 for different animation sync effects.
endis calculated based on tween provided should always be greater than
startat any point of time, or
pathwill not be visible.
offsetvalue for given
animationis added in both
For a constant value use
Works for continuous and non-continuous path both.
1. Fork it (<https://github.com/himanshugarg08/animated_path/fork>) 2. Create your feature branch (`git checkout -b feature/fooBar`) 3. Commit your changes (`git commit -am 'Add some fooBar'`) 4. Push to the branch (`git push origin feature/fooBar`) 5. Create a new Pull Request