https://github.com/ThomasEcalle/bouncing_widget
A widget that enables you to add a bouncing animation on a widget.
https://github.com/ThomasEcalle/bouncing_widget
flutter flutter-animation flutter-package
Last synced: 6 months ago
JSON representation
A widget that enables you to add a bouncing animation on a widget.
- Host: GitHub
- URL: https://github.com/ThomasEcalle/bouncing_widget
- Owner: ThomasEcalle
- License: mit
- Created: 2019-11-06T23:41:07.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T13:22:07.000Z (about 2 years ago)
- Last Synced: 2025-04-21T02:15:51.718Z (7 months ago)
- Topics: flutter, flutter-animation, flutter-package
- Language: Dart
- Size: 1.41 MB
- Stars: 43
- Watchers: 1
- Forks: 13
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# bouncing_widget
A widget that enables you to add a bouncing animation on a widget.
## Example
## How does it work ?
You just have to encapsulate the widget of your choice with a `BouncingWidget`.
You may also use a `scaleFactor` to customize the scaling effect as in the gif example.
Or even customize the animation's duration with the `duration` parameter (200 milliseconds by default).
```
BouncingWidget(
duration: Duration(milliseconds: 100),
scaleFactor: 1.5,
onPressed: () {
print("onPressed");
},
child: Text(
"Hello !",
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 35,
),
),
),
```