roulette 1.0.0
roulette: ^1.0.0 copied to clipboard
This is a library provide a simple roulette widget which usually used for lottery.
1.0.0 - 2026-11-19 #
Breaking changes #
- Roulette now uses Flutter's widgets library without importing
package:flutter/material.dart. Apps can still pass their own Material colors and icons. RouletteandTappableRouletterequire astyle. SetcenterStickerColoranddividerColorexplicitly when constructing aRouletteStyle. TheRouletteStyle.material()constructor from the release candidate has been removed. To keep the previous colors in a Material app, useRouletteStyle(centerStickerColor: Colors.blue, dividerColor: Colors.white).- Pass an explicit
colortoRouletteUnit.text,RouletteUnit.noText, andRouletteUnit.icon. RouletteGroup.uniformrequirescolorBuilder.RouletteGroup.uniformIconsrequires bothcolorBuilderandiconBuilder.RouletteUnit.imageandRouletteGroup.uniformImagesuse a transparent background by default. PasscolororcolorBuilderto keep the previous blue background.- The default icon style no longer sets a white foreground. To keep white icons, pass
TextStyle(color: Colors.white)viaRouletteUnit.icon'sstyleorRouletteGroup.uniformIcons'sstyleBuilder.
Tooling #
- Development and CI now use mise with Flutter 3.50. The tests and example use
material_ui.
1.0.0-rc.1 2026/8/14 #
⚠ Breaking changes: #
- Dropped the dependency on
package:flutter/material.dart— the library now only importspackage:flutter/widgets.dart. Material colors (Colors.*) and icons (Icons.*) are no longer used inside the package; consumers can still pass anyColor/IconDatafrom their own material-based app. Roulette.styleandTappableRoulette.styleare now required parameters.RouletteStylenow requirescenterStickerColoranddividerColor(previously defaulted toColors.blue/Colors.white). The deprecatedRouletteStyle.material()constructor ports the old default colors — prefer specifying the colors explicitly. The ported implementation will be removed in next release.RouletteUnit,RouletteUnit.noTextandRouletteUnit.iconnow require an explicitcolor.RouletteUnit.textunits without an explicit color now render transparent instead ofColors.blue.RouletteGroup.uniformandRouletteGroup.uniformIconsnow requirecolorBuilder(andiconBuilderrespectively).- For more information. check the PR detail here.
Others: #
- Built with Flutter 3.47 SDK; minimum supported SDK is unchanged (Flutter >= 3.7.0).
- Added
material_uias a dev dependency (used by the tests) and to the example app.
0.3.2 2026/3/10 #
New feature #
- You can now roll the Roulette infinitely with
rollInfinitelymethod, until you callrollToorstopmethod. The example is also updated to show how to use it.
0.3.1 2026/3/9 #
0.3.0 2026/3/4 #
New feature #
- Physics-based animation support via
PhysicsAnimationConfig. The roulette wheel now decelerates naturally using a friction simulation, with duration determined by thedragcoefficient.
⚠ Breaking changes: #
- The
durationparameter has been moved fromrollTointoCurveAnimationConfig. When noAnimationConfigis provided, the defaultCurveAnimationConfig(with default duration and curve) is used automatically. For more information, check the Migration Guide here.
0.2.2+1 2026/3/3 #
Bugfix #
- Fix
SectionImageLayout.rotatedFitincorrectly usingTileMode.clampinstead ofTileMode.repeated, which caused section background images to render incorrectly under this layout mode.
0.2.2 2026/3/3 #
New feature #
- Add an enum
SectionImageLayoutto control how a background image is laid out within each roulette section. See API documentation for details. Thanks to @TheMrAleX for the contribution.
Others #
- Build with Flutter SDK 3.41, update lint version
0.2.1 2025/12/4 #
- Build with latest Flutter SDK, update lint version and fix lint issue.
- No breaking changes and new features.
0.2.0 - 2024-10-12 #
- Update flutter lint version and fix lint issue.
⚠ Breaking changes: #
- Minimum required Flutter version has been upgraded to 3.7.0.
- The
RouletteandRouletteControllerhas been reworked, check the Migration Guide here.
0.1.5 2023/8/31 #
New feature #
- Image support in
Rouletteby @antoninhrlt: You can now useImageProviders as roulette sector background!
0.1.4 2023/5/15 #
New feature #
IconDatasupport inRouletteby @antoninhrlt
SDK upgrade: #
- Update Flutter version to latest stable (3.10.0), and enable the dart3 support.
- ⚠ If this update break your build because of the SDK upgrade, please feel free to raise a issue.
0.1.3+1 2022/11/2 #
- Document image reference fix
- Usage
colorBuildersyntax fix - Make
RouletteaStatelessWidget
0.1.3 - 2022-10-21 #
Behavior changes: #
rollTomethod now continue from the last stopped point, if you need the roulette roll from the "zero" position, callRouletteController.resetAnimationbeforerollTo.
SDK upgrade: #
- Update Flutter version to latest (3.3.4)
- ⚠ If this update break your build because of the SDK upgrade, please feel free to raise a issue.
0.1.2 - 2022-06-25 #
- Update Flutter version to latest (3.0.3)
- Update lint to 2.0.1 and fix lint warnings
- Fix
rollTomethod's document, there's norandomparameter butoffset - Clean up the example
- Add more detail usage to
README.md - ⚠ If this update break your build because of the SDK upgrade, please feel free to raise a issue.
0.1.1 - 2022-05-31 #
- Fix a bug which causes the full-width characters layout incorrectly. (Thanks for @SeeLog's contribution!)
0.1.0+1 - 2022-01-15 #
- Readme document snapshot resource fix.
0.1.0 - 2022-01-11 #
⚠ Breaking changes: #
- The
RouletteControllerparameterclockwisehas been removed since it does nothing. If you want to control the roll direction, useclockwiseinRouletteController.rollToinstead.
Normal changes: #
- The
RouletteControllerpublic constructor is now a factory constructor.
Others: #
- Add some new test case
- Fix some document
- Update some example codes
0.0.1+2 - 2021-12-14 #
- Fix some document
0.0.1+1 - 2021-12-13 #
- Change min sdk version to 2.12.0(The first SDK that supports null safety)
- Fix some pub score warnings