roulette
roulette copied to clipboard
Introduce UnitDecoration
Closing #5
Now I have 2 idea:
- Create a generic decoration just like the BoxDecoration which flutter framework provided, rather than a lot of decoration types.
- Just try to draw the BoxDecoration directly into the units.
Just try to draw the BoxDecoration directly into the units.
I prefer to implement this, which saves a lot of effort on checking the inputs because we just align the framework behavior.
Just try to draw the BoxDecoration directly into the units.
I prefer to implement this, which saves a lot of effort on checking the inputs because we just align the framework behavior.
Now I don't consider 2. a good idea anymore 💔 let's try 1.
This commit has many changes.
- The deprecated
ColorDecorationand oldUnitDecorationclass have been removed. - Introduce new
UnitDecorationclass, adapt tests and example to it. - The
RouletteGroup.uniformconstructor has been deprecated and replaced by a general constructorRouletteGroup.builderwhich supports weight builder. - I want to consider more about the roulette itself. So the roulette widget no longer draw the center sticker, if you need one, add roulette to stack and draw it yourself.
- [ ] The new changes may break the presentation tests, I'll update the golden test images later.