gamification_wheel
A fully customizable, animated spinning wheel widget for Flutter. Perfect for games, rewards, decision-making, and interactive apps. Not for gambling or betting purposes.
Features
- 🎯 Customizable segments (text, color, probability)
- 🎨 Modern Material 3 UI
- ⚡ Smooth, high-performance animations
- 🏆 Weighted probability (fair, customizable spins)
- 🖼️ Custom pointer and center widget
- 📱 Responsive (mobile, web, desktop)
- 🛠️ Easy integration, no external state management required
- 📝 Null safety and up-to-date Flutter support
Demo

Installation
Add to your pubspec.yaml:
dependencies:
gamification_wheel: ^0.1.2
Then run:
flutter pub get
Quick Usage
import 'package:gamification_wheel/gamification_wheel.dart';
final segments = [
WheelSegment(id: '1', text: 'Pizza', color: '#FF6B6B', probability: 2.0),
WheelSegment(id: '2', text: 'Burger', color: '#4ECDC4', probability: 1.0),
WheelSegment(id: '3', text: 'Sushi', color: '#45B7D1', probability: 1.0),
// ... more segments
];
GWheel(
segments: segments,
wheelSize: 300,
animationSpeed: 2.0,
showPointer: true,
enableTapToSpin: true,
showCenterDot: true,
showWheelShadow: true,
centerWidget: Icon(Icons.star, size: 40, color: Colors.white),
onFinish: (result) {
print('You got: ${result.text}');
},
)
Customization
- Wheel Size:
wheelSize(e.g. 200-400) - Animation Speed:
animationSpeed(0.5x to 3.0x) - Segment Colors: Any hex color code
- Probability: Set different weights for each segment
- Pointer & Center Widget: Fully customizable
- Styling: Shadows, borders, font styles, and more
Documentation & Changelog
License
MIT License. See LICENSE.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
⚠️ Important Notice
This package is NOT intended for gambling, betting, or any real-money gaming purposes. It is designed for gamification, education, entertainment, and decision-making apps only.
Libraries
- core/constants/color_constants
- core/constants/wheel_constants
- core/di/injection_container
- core/utils/helpers/init/app_initialize
- data/datasources/wheel_local_datasource
- data/repositories/wheel_repository_impl
- domain/entities/common/base_entity
- domain/entities/entities
- domain/entities/wheel/wheel_segment
- domain/repositories/wheel_repository
- domain/usecases/spin_wheel_usecase
- gamification_wheel
- main
- presentation/blocs/wheel/events
- presentation/blocs/wheel/states
- presentation/blocs/wheel/wheel_bloc
- presentation/blocs/wheel_display/events
- presentation/blocs/wheel_display/states
- presentation/blocs/wheel_display/wheel_display_bloc
- presentation/blocs/wheel_widget/events
- presentation/blocs/wheel_widget/states
- presentation/blocs/wheel_widget/wheel_widget_bloc
- presentation/pages/main_app
- presentation/pages/wheel_page
- presentation/widgets/wheel/wheel_animation_controller
- presentation/widgets/wheel/wheel_controls
- presentation/widgets/wheel/wheel_display
- presentation/widgets/wheel/wheel_painter
- presentation/widgets/wheel/wheel_widget
- presentation/widgets/wheel/wheel_widget_export
- utils/color_utils
- wheel