I'm building a flutter mobile app and I need to compute an area of some GeoJson geometries.
Say we have a GeoJson-like object:
final geo = {
"type": "Polygon",
"coordinates": [[
[-122.085, 37.423],
[-122.083, 37.423],
[-122.083, 37.421],
[-122.085, 37.421],
[-122.085, 37.423]
]]
};
Assuming the projection is EPSG:4326, how do we get the actual area of the geometry using flutter or dart?
Tried to use dart-simple-features, but this is no longer maintained and requires SDK < 2.0.0.
Another option that came to my mind is to use some JavaScript library in combination with flutter_webview_plugin, but oh my... That seems like an overkill!
Also there is a possibility to use platform-specific code, but for the sake of development experience: let's avoid testing on multiple platforms if possible...
Any ideas? Or recommendations?