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

use offline data #97

Closed
giantss opened this issue Jan 7, 2025 · 1 comment
Closed

use offline data #97

giantss opened this issue Jan 7, 2025 · 1 comment

Comments

@giantss
Copy link

giantss commented Jan 7, 2025

I want to use offline data how can I do it?

@Mr-Pepe
Copy link
Collaborator

Mr-Pepe commented Jan 7, 2025

Simply pass the JSON for one of the characters to the StrokeOrder constructor. Something like this should work:

final strokeOrder = StrokeOrder('{"character":"⺀","strokes":["M 323 706 Q 325 699 328 694 Q 334 686 367 671 Q 474 619 574 561 Q 600 545 617 543 Q 627 545 631 559 Q 641 576 613 621 Q 575 684 334 717 Q 321 719 323 706 Z","M 312 541 Q 314 535 316 531 Q 320 524 347 512 Q 455 461 563 397 Q 588 380 606 380 Q 615 382 619 396 Q 629 414 602 457 Q 564 519 321 554 Q 320 555 319 555 Q 310 555 312 541 Z"],"medians":[[[336,704],[450,666],[554,620],[587,595],[614,558]],[[317,548],[347,531],[455,496],[543,456],[578,430],[602,395]]]}');

final controller = StrokeOrderAnimationController(strokeOrder, this);

@giantss giantss closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants