Adding physics to your Flutter App
summary
Built a live “bubble chart” that maps widget votes to physics-driven circles using Force2D (Box2D port) with Flame + flame_forge2d bridge, Firebase for votes and flame_bloc for state. Each bubble is a dynamic body with fixtures (radius, density, restitution), per-bubble gravity override that pulls toward the screen center, and tappable/draggable mixins that update both visual circle and physics shape. Demo runs locally, collisions and growth work; Force2D is v0.11 and still young.
AI-written summary · about
chapters (16)
- 0:00Introduction to physics in Flutter
- 1:09What is Force 2D
- 2:56Demo: Bubble chart concept
- 4:43Force 2D world and bodies
- 7:54Overview of Flame engine
- 9:19Creating a bubble component
- 11:03Adding movement to components
- 13:09Flame Force 2D integration
- 15:17Adding static and dynamic bodies
- 16:20Custom gravity for bubbles
- 17:23Adding multiple bubbles
- 18:04Handling taps on bubbles
- 19:28Final demo and interactions
- 19:48Recap of key concepts
- 20:32Advanced features and resources
- 21:57Q&A and closing







