getVisibleRegion method
Return the region that is visible in a map.
Implementation
@override
Future<LatLngBounds> getVisibleRegion({
required int mapId,
}) async {
final Map<String, dynamic> latLngBounds = (await channel(mapId)
.invokeMapMethod<String, dynamic>('map#getVisibleRegion'))!;
final LatLng southwest = LatLng.fromJson(latLngBounds['southwest'])!;
final LatLng northeast = LatLng.fromJson(latLngBounds['northeast'])!;
return LatLngBounds(northeast: northeast, southwest: southwest);
}