-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
What could be improved
Remove requirement for dart:ui
and therefore the Flutter SDK
Why should this be improved
Currently this package/parser is only usable with the Flutter SDK. However I believe there are valid use-cases for the Dart SDK. For example I'm currently working on a CLI to optimize tmx to only include the tiles actually used in a map in it's tilesets. This is not possible using the Flutter SDK.
Any risks?
This improvement would require the removal of all dart:ui dependencies. However there are only two in this project, which I replaced in the "#69-dart-sdk branch" on my fork:
- Color, which I replaced with color_models and a little bit of code for hex parsing
- Rect, which I simply replaced by
dart:math
's Rectangle
More information
These changes would break public contracts and therefore require some work on the flame_tiled plugin.
However I believe this would be minimal. I did not look into this further, but from what I changed this would only require converting Rect to Rectangle and casting ColorModel to Model, which is implemented in flutter_color_models.
I believe this would be worth it and I am prepared to submit PRs both here and in flame_tiled to make these rather simple changes. However if you would consider this to be too invasive, I am happy to just keep this as a fork!