roulette icon indicating copy to clipboard operation
roulette copied to clipboard

Introduce UnitDecoration

Open do9core opened this issue 3 years ago • 4 comments

Closing #5

do9core avatar Jan 17 '22 13:01 do9core

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.

do9core avatar Feb 18 '22 09:02 do9core

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.

do9core avatar Feb 18 '22 09:02 do9core

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.

do9core avatar Mar 04 '22 09:03 do9core

This commit has many changes.

  1. The deprecated ColorDecoration and old UnitDecoration class have been removed.
  2. Introduce new UnitDecoration class, adapt tests and example to it.
  3. The RouletteGroup.uniform constructor has been deprecated and replaced by a general constructor RouletteGroup.builder which supports weight builder.
  4. 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.

do9core avatar Mar 28 '22 11:03 do9core