chill-chinese / stroke-order-animator

Stroke order animations and quizzes for Chinese characters in Flutter.
https://chill-chinese.github.io/stroke-order-animator/
BSD 3-Clause "New" or "Revised" License
86 stars 22 forks source link

Show the filled character instead of an outline #27

Closed ehdwns980416 closed 3 months ago

ehdwns980416 commented 1 year ago

How to show users a preview before showing the stroke animation?

image

Mr-Pepe commented 1 year ago

A preview of what exactly?

ehdwns980416 commented 1 year ago

@Mr-Pepe I want to show the shape of the letter in a filled color, not an outline.

Mr-Pepe commented 1 year ago

Got it. Do you want to still have an additional outline? The feature would be a nice one but I don't think that I'll find the time to implement it anytime soon. For the time being, you could maybe draw the same character twice, with one drawing onto the other.

ehdwns980416 commented 1 year ago

That's great! I can use showFullCharacter() for the base character, right?

Mr-Pepe commented 1 year ago

Yes, that should work. You can give it the color you want by setting the strokeColor.

Mr-Pepe commented 3 months ago

@ehdwns980416 I don't know if this is still relevant to you, but the feature is available in version 3.2.0 :slightly_smiling_face:

Simply set showBackground: true when creating the StrokeOrderAnimationController or call setShowBackground(true) on it. You can set the color via backgroundColor.