slot_machine_roller

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

slot machine roller

Slot Machine Roller #
The easiest way to control slot machine.
You just use setState to pass to target parameter to deterministic value to stop rolling.
Otherwise pass null to target parameter to start rolling until no null.
Here is the demo page.
Features #

Easy way to start/stop rolling.
Customized build items in roller.
Deterministic value to stop in anytime.
The rolling animation involved damping.
Enable rolling delay at start time.
With up or down rolling direction.

Getting started #
flutter pub add slot_machine_roller
copied to clipboard
Usage #
You can see example for more details.
SlotMachineRoller(
height: 170,
width: 300,
delay: Duration(seconds: 1)
reverse: true,
target: target,
itemBuilder: (e) => Container(
margin: EdgeInsets.symmetric(vertical: 10),
height: 150,
width: 150,
alignment: Alignment.center,
decoration: BoxDecoration(
shape: BoxShape.circle, color: Colors.blue),
child: Text(
'$e',
style: Theme.of(context)
.primaryTextTheme
.headlineLarge,
),
)),
// To stop roller and suspend 4
setState(){
target = 4;
}
// To start rolling until deterministic target
setState(){
target = null;
}
copied to clipboard
Please Note the height of item should as equal as the height of SlotMachineRoller. Because we expect the view only one item in roller.
Additional information #
The assets images are referred from
https://github.com/josex2r/jQuery-SlotMachine.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.