Skip to main content

roulette 1.0.0 copy "roulette: ^1.0.0" to clipboard
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.
  • Roulette and TappableRoulette require a style. Set centerStickerColor and dividerColor explicitly when constructing a RouletteStyle. The RouletteStyle.material() constructor from the release candidate has been removed. To keep the previous colors in a Material app, use RouletteStyle(centerStickerColor: Colors.blue, dividerColor: Colors.white).
  • Pass an explicit color to RouletteUnit.text, RouletteUnit.noText, and RouletteUnit.icon.
  • RouletteGroup.uniform requires colorBuilder. RouletteGroup.uniformIcons requires both colorBuilder and iconBuilder.
  • RouletteUnit.image and RouletteGroup.uniformImages use a transparent background by default. Pass color or colorBuilder to keep the previous blue background.
  • The default icon style no longer sets a white foreground. To keep white icons, pass TextStyle(color: Colors.white) via RouletteUnit.icon's style or RouletteGroup.uniformIcons's styleBuilder.

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 imports package:flutter/widgets.dart. Material colors (Colors.*) and icons (Icons.*) are no longer used inside the package; consumers can still pass any Color / IconData from their own material-based app.
  • Roulette.style and TappableRoulette.style are now required parameters.
  • RouletteStyle now requires centerStickerColor and dividerColor (previously defaulted to Colors.blue / Colors.white). The deprecated RouletteStyle.material() constructor ports the old default colors — prefer specifying the colors explicitly. The ported implementation will be removed in next release.
  • RouletteUnit, RouletteUnit.noText and RouletteUnit.icon now require an explicit color.
  • RouletteUnit.text units without an explicit color now render transparent instead of Colors.blue.
  • RouletteGroup.uniform and RouletteGroup.uniformIcons now require colorBuilder (and iconBuilder respectively).
  • 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_ui as 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 rollInfinitely method, until you call rollTo or stop method. The example is also updated to show how to use it.

0.3.1 2026/3/9 #

New feature #

  • Add TappableRoulette widget with sector tap detection.

Others #

  • Add device_preview_plus to the example app.

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 the drag coefficient.

⚠ Breaking changes: #

  • The duration parameter has been moved from rollTo into CurveAnimationConfig. When no AnimationConfig is provided, the default CurveAnimationConfig (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.rotatedFit incorrectly using TileMode.clamp instead of TileMode.repeated, which caused section background images to render incorrectly under this layout mode.

0.2.2 2026/3/3 #

New feature #

  • Add an enum SectionImageLayout to 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 Roulette and RouletteController has been reworked, check the Migration Guide here.

0.1.5 2023/8/31 #

New feature #

  • Image support in Roulette by @antoninhrlt: You can now use ImageProviders as roulette sector background!

0.1.4 2023/5/15 #

New feature #

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 colorBuilder syntax fix
  • Make Roulette a StatelessWidget

0.1.3 - 2022-10-21 #

Behavior changes: #

  • rollTo method now continue from the last stopped point, if you need the roulette roll from the "zero" position, call RouletteController.resetAnimation before rollTo.

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 rollTo method's document, there's no random parameter but offset
  • 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 RouletteController parameter clockwise has been removed since it does nothing. If you want to control the roll direction, use clockwise in RouletteController.rollTo instead.

Normal changes: #

  • The RouletteController public 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

0.0.1 - 2021-12-12 #

  • Initial release of the roulette package!
  • Please check the home page for package information
53
likes
160
points
471
downloads

Documentation

API reference

Publisher

verified publisherwolframe.org

Weekly Downloads

This is a library provide a simple roulette widget which usually used for lottery.

Repository (GitHub)
View/report issues

Topics

#widget

License

Apache-2.0 (license)

Dependencies

flutter, meta

More

Packages that depend on roulette