roulette
0.3.2, released 8 months ago by wolframe.org
A simple roulette wheel widget for lottery usage and spinning animations.
WASM-ready
What it does
Provides customizable roulette wheel widgets with support for text, icons, and background images. Features a RouletteController to manage roll animations, physics or curve-based easing, and sector tap detection.
AI-written summary of version 0.3.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a lottery or prize wheel in your app.
- You want customizable roulette sections with text, icons, or images.
Skip it when
- You are building complex games requiring a general physics engine.
Strengths
- Easy to customize with weight-based parts, text, icons, and images.
- Supports both curve-based and physics-based animations.
- Includes tap detection for roulette sectors.
Weaknesses
- Niche widget with a single specific use case.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
final controller = RouletteController();
final group = RouletteGroup.uniform(
4,
colorBuilder: (index) => Colors.blue,
textBuilder: (index) => 'Item $index',
);
Widget build(BuildContext context) {
return Roulette(
group: group,
controller: controller,
);
}