|
| 1 | +# Path Animator |
| 2 | + |
| 3 | +A flutter package to draw path with animation on canvas. |
| 4 | + |
| 5 | +## Show some :heart: and :star: the repo |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +✅ Animated Path Drawing </br> |
| 10 | + |
| 11 | +## Demo |
| 12 | + |
| 13 | +|<img height=500 src="https://i.imgur.com/3wqFiFK.gif"/>| |
| 14 | +|---| |
| 15 | + |
| 16 | +## Getting started |
| 17 | + |
| 18 | +Include plugin to your project |
| 19 | + |
| 20 | +```yml |
| 21 | +dependencies: |
| 22 | + path_animator: <latest version> |
| 23 | +``` |
| 24 | +
|
| 25 | +Run `pub get` and get packages. |
| 26 | + |
| 27 | +### Build Animated Path |
| 28 | + |
| 29 | +The `build` function creates animated path and returns it. |
| 30 | + |
| 31 | +```dart |
| 32 | +final animatedPath = PathAnimator.build( |
| 33 | + path: path, |
| 34 | + animationPercent: controller.value, |
| 35 | +); |
| 36 | +``` |
| 37 | + |
| 38 | +The returned animated path is then used to draw the path on the canvas. |
| 39 | + |
| 40 | +```dart |
| 41 | +canvas.drawPath(animatedPath, paint); |
| 42 | +``` |
| 43 | + |
| 44 | +## Example |
| 45 | + |
| 46 | +Go to example section in pub.dev to see the full example code. |
| 47 | + |
| 48 | +In GitHub, head over to `example/lib/main.dart` to see the full example code. |
| 49 | + |
| 50 | +## Project Created & Maintained By |
| 51 | + |
| 52 | +### Divyanshu Shekhar |
| 53 | + |
| 54 | +<a href="https://twitter.com/dshekhar17"><img src="https://github.com/aritraroy/social-icons/blob/master/twitter-icon.png?raw=true" width="60"></a> <a href="https://in.linkedin.com/in/divyanshu-shekhar-a8a04a162"><img src="https://github.com/aritraroy/social-icons/blob/master/linkedin-icon.png?raw=true" width="60"></a> <a href="https://instagram.com/dshekhar17"><img src="https://github.com/aritraroy/social-icons/blob/master/instagram-icon.png?raw=true" width="60"></a> |
| 55 | + |
| 56 | +[](https://github.com/divshekhar/) |
| 57 | + |
| 58 | +## Contributions |
| 59 | + |
| 60 | +Contributions are welcomed! |
| 61 | + |
| 62 | +**If you feel that a hook is missing, feel free to open a pull-request.** |
| 63 | + |
| 64 | +For a custom-hook to be merged, you will need to do the following: |
| 65 | + |
| 66 | +* Describe the use-case. |
| 67 | + |
| 68 | +* Open an issue explaining why we need this hook, how to use it, ... |
| 69 | + This is important as a hook will not get merged if the hook doens't appeal to |
| 70 | + a large number of people. |
| 71 | + |
| 72 | +* If your hook is rejected, don't worry! A rejection doesn't mean that it won't |
| 73 | + be merged later in the future if more people shows an interest in it. |
| 74 | + In the mean-time, feel free to publish your hook as a package on [https://pub.dev](https://pub.dev). |
| 75 | + |
| 76 | +* A hook will not be merged unles fully tested, to avoid breaking it inadvertendly in the future. |
| 77 | + |
| 78 | +## Stargazers |
| 79 | + |
| 80 | +[](https://github.com/DevsOnFlutter/path_animator/stargazers) |
| 81 | + |
| 82 | +## Forkers |
| 83 | + |
| 84 | +[](https://github.com/DevsOnFlutter/path_animator/network/members) |
| 85 | + |
| 86 | +## Copyright & License |
| 87 | + |
| 88 | +Code and documentation Copyright (c) 2021 [DevsOnFlutter](https://github.com/DevsOnFlutter). Code released under the [BSD 3-Clause License](./LICENSE). |
0 commit comments