zeba_academy_physics_ui 1.0.0
zeba_academy_physics_ui: ^1.0.0 copied to clipboard
Physics-based Flutter UI package with spring animations, elastic dragging, snap effects, collision interactions, and momentum scrolling.
zeba_academy_physics_ui #
A powerful Flutter package providing beautiful physics-based UI interactions and animations.
✨ Features #
✅ Spring animations
✅ Elastic dragging
✅ Snap effects
✅ Collision interactions
✅ Momentum scrolling
✅ Smooth physics behavior
✅ Lightweight and dependency-free
✅ Easy to integrate
📦 Installation #
Add this to your pubspec.yaml:
dependencies:
zeba_academy_physics_ui: ^1.0.0
Then run:
flutter pub get
🚀 Import #
import 'package:zeba_academy_physics_ui/zeba_academy_physics_ui.dart';
📚 Widgets #
| Widget | Description |
|---|---|
SpringContainer |
Elastic spring tap animation |
ElasticDrag |
Physics-based draggable widget |
SnapWidget |
Snap-back interaction effect |
CollisionWidget |
Boundary collision behavior |
MomentumScroll |
Smooth momentum scrolling |
🌟 SpringContainer #
Provides spring tap animations.
SpringContainer(
child: Container(
width: 120,
height: 120,
color: Colors.blue,
),
)
🌟 ElasticDrag #
Draggable widget with elastic return effect.
ElasticDrag(
child: Container(
width: 120,
height: 120,
color: Colors.green,
),
)
🌟 SnapWidget #
Widget snaps back smoothly after drag.
SnapWidget(
child: Container(
width: 120,
height: 120,
color: Colors.orange,
),
)
🌟 CollisionWidget #
Provides collision boundaries inside screen.
CollisionWidget(
child: Container(
width: 120,
height: 120,
color: Colors.red,
),
)
🌟 MomentumScroll #
Smooth momentum scrolling experience.
MomentumScroll(
children: [
Container(height: 200, color: Colors.blue),
Container(height: 200, color: Colors.green),
],
)
🧪 Testing #
Run tests using:
flutter test
📂 Example #
import 'package:flutter/material.dart';
import 'package:zeba_academy_physics_ui/zeba_academy_physics_ui.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Physics UI Demo'),
),
body: Center(
child: SpringContainer(
child: ElasticDrag(
child: SnapWidget(
child: CollisionWidget(
child: Container(
width: 120,
height: 120,
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(20),
),
),
),
),
),
),
),
),
);
}
}
📸 Screenshots #
Add your screenshots here.
example/screenshots/
🔥 Roadmap #
- ❌ Gravity physics
- ❌ Magnetic snapping
- ❌ Toss animations
- ❌ Physics page transitions
- ❌ Draggable card stacks
- ❌ Interactive particles
- ❌ Liquid swipe physics
🤝 Contributing #
Contributions are welcome!
Feel free to open issues and pull requests.
📜 License #
This project is licensed under the GNU General Public License v3.0.
See the LICENSE file for details.
👨💻 About Me #
✨ I’m Sufyan bin Uzayr, an open-source developer passionate about building and sharing meaningful projects.
You can learn more about me and my work at sufyanism.com or connect with me on LinkedIn
🚀 Your all-in-one learning hub! #
Explore courses and resources in coding, tech, and development at Zeba Academy.
💻 Practical tutorials
🚀 Real-world projects
🎯 Hands-on learning experience
🌐 Zeba Academy Links #
➡ Main Website: https://zeba.academy
➡ Coding Platform: https://code.zeba.academy
➡ YouTube: https://www.youtube.com/@zeba.academy
➡ Instagram: https://www.instagram.com/zeba.academy/
❤️ Support #
If you like this package, give it a ⭐ on GitHub and share it with the Flutter community.
🙌 Thank You #
Thank you for visiting and supporting open-source development!