Bouncing Ball
A simple Flutter widget that simulates a bouncing ball with physics.
Supports gravity, friction, elasticity, and obstacles (blockers). Works with circle or square balls
and allows interactive dragging.
Features
- ✅ Gravity – ball falls naturally.
- ✅ Friction – slows down horizontal and vertical motion over time.
- ✅ Elasticity – bounces off walls and blockers.
- ✅ Blockers – rectangular widgets that the ball can collide with.
- ✅ Circle or square shapes.
- ✅ Interactive – push the ball using drag gestures.
- ✅ Configurable ball size, gravity, friction, and timestep (
dt).
Installation
Add the package to your pubspec.yaml:
dependencies:
bouncing_ball: last_version
## License
This package is licensed under the MIT License. See the LICENSE file for details.