mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
245 stars 93 forks source link

Fix multiword enum cases encoding and decoding #523

Closed evil159 closed 2 weeks ago

evil159 commented 2 weeks ago

What does this pull request do?

Multi-word enum cases were not encoded/decoded properly - instead of the correct form e.g. some-value it would be some_value which would cause a PlatformException.

What is the motivation and context behind this change?

https://github.com/mapbox/mapbox-maps-flutter/issues/500, https://github.com/mapbox/mapbox-maps-flutter/issues/455, https://github.com/mapbox/mapbox-maps-flutter/issues/161, https://mapbox.atlassian.net/browse/MAPSFLT-206

Pull request checklist:

bf-vs commented 2 weeks ago

LGTM but why not use enhanced enums? It would be a cleaner solution.

evil159 commented 2 weeks ago

LGTM but why not use enhanced enums? It would be a cleaner solution.

Our code generation tool - Pigeon, doesn't support them.