Getting type 'List<Object>' is not a subtype of type 'String?' error on text anchors
Closed this issue · 3 comments
alfalcon90 commented
I'm using a custom MapBox style and some text-anchor fields in the theme data are lists instead of strings:
"text-anchor": [
"step",
["zoom"],
[
"step",
["get", "sizerank"],
"center",
5,
"top"
],
17,
[
"step",
["get", "sizerank"],
"center",
13,
"top"
]
],
This causes an error when typecasting text-anchor on line 134 inside theme_reader.dart
final anchor = LayoutAnchor.fromName(layout?['text-anchor'] as String?);
Are there plans to support these text-anchor values?
Thanks in advance
greensopinion commented
Hi, thanks for the issue.
Ultimately I'd like to support all valid styles. I'm not planning on tackling this one right away, feel free to submit a PR!
greensopinion commented
should be fixed with commit df91ab4 let me know if you still notice a problem with the latest release!
alfalcon90 commented
Fixed! Thank you so much.