Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce UnitDecoration #9

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Introduce UnitDecoration #9

wants to merge 10 commits into from

Conversation

do9core
Copy link
Owner

@do9core do9core commented Jan 17, 2022

Closing #5

@do9core do9core added enhancement New feature or request help wanted Extra attention is needed labels Jan 17, 2022
@do9core do9core self-assigned this Jan 17, 2022
@do9core do9core changed the title Introduce UnitDecoration and its implementation ColorDecoration Introduce UnitDecoration Jan 17, 2022
@do9core do9core linked an issue Jan 17, 2022 that may be closed by this pull request
@do9core
Copy link
Owner Author

do9core commented Feb 18, 2022

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
Copy link
Owner Author

do9core commented Feb 18, 2022

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 do9core removed the help wanted Extra attention is needed label Feb 18, 2022
@do9core
Copy link
Owner Author

do9core commented Mar 4, 2022

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.

1. The `ColorDecoration` and old `UnitDecoration` class has been removed.

2. Introduce new `UnitDecoration` class

3. The `RouletteGroup.uniform` constructor has been deprecated, and add a general constructor `RouletteGroup.builder` which supports weight builder.

4. The roulette widget no longer draw the center sticker, if you need one, add roulette to stack and draw it yourself over the roulette.
@do9core
Copy link
Owner Author

do9core commented Mar 28, 2022

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.

commit 08f2a9a5a5abec9d54e1987f0c6e8b5892c6a2ab
Author: do9core <do9core@outlook.com>
Date:   Thu Apr 21 14:23:36 2022 +0800

    Update dependency.
    Seperate AnimatedRoulette and static Roulette.
Render borders using BorderSide.
Add basic gradient drawing support and test for future development.
Sum weights in constructor rather than using late final.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace color for Sector with more genecic model (such as Decoration)
1 participant