spinning_wheel 0.0.1
spinning_wheel: ^0.0.1 copied to clipboard
A customizable and animated spinning wheel for Flutter, perfect for games, lucky draws, and prize wheels.
Spinning Wheel ๐ก
A fully customizable spinning wheel for Flutter applications! Easily create fortune wheels, prize spinners, or game-based random selectors with smooth animations and custom segments.
๐ Features
โ Fully customizable spinning wheel ๐จ โ Supports text labels, colors, and images ๐ผ๏ธ โ Smooth animation with realistic spin physics ๐ฏ โ Callback for detecting spin completion ๐ฅ
๐ฆ Installation
Add this package to your pubspec.yaml:
dependencies: spinning_wheel: latest_version Then, run:
flutter pub get ๐ง Usage
1๏ธโฃ Import the Package import 'package:spinning_wheel/spinning_wheel.dart';
2๏ธโฃ Create a SpinnerController final SpinnerController controller = SpinnerController();
3๏ธโฃ Define Wheel Segments List
4๏ธโฃ Add the SpinnerWheel Widget SpinnerWheel( controller: controller, segments: segments, wheelColor: Colors.white, onComplete: (result) { print("You won: ${result.label}"); }, );
5๏ธโฃ Start Spinning! controller.startSpin();
๐ผ๏ธ Screenshot
๐ API Reference
Property Type Description controller SpinnerController Controls the spin animation segments List
This package is licensed under the MIT License.
๐ Support
If you like this package, โญ Star it on GitHub! For issues or feature requests, open an issue on GitHub.
๐ Happy Spinning! ๐กโจ