luckywheel 1.0.0 copy "luckywheel: ^1.0.0" to clipboard
luckywheel: ^1.0.0 copied to clipboard

This is a package to help your create your lucky wheel (spinning widget) easily and effectively

Easier to create your Lucky Wheel!

Getting Started #

To use this plugin, add luckywheel as a dependency in your pubspec.yaml file.

See the example to get started quickly. To generate the platform folders run:

flutter create .

in the example folder.

To begin you need to instantiate a LuckyWheelController variable and pass in a controller argument of LuckyWheel widget.

LuckyWheelController _wheelController = LuckyWheelController(
  vsync: this,
  totalParts: 8,
  onRotationEnd: (idx) {
    _result.value = idx;
  },
);

After that, you can easily use the LuckyWheel Widget with the code below.

LuckyWheel(
  controller: _wheelController,
  onResult: (result) {
    _result.value = result;
  },
  child: const SpinningWidget(width: 300, height: 300, totalParts: 8),
  // child: Image.asset('images/wheel.png', width: 300, height: 300),
),

Enjoy the Lucky Wheel. #

11
likes
160
points
51
downloads

Publisher

unverified uploader

Weekly Downloads

This is a package to help your create your lucky wheel (spinning widget) easily and effectively

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on luckywheel