setFromBounds method
Sets rectangle coordinates using minimum and maximum latitude/longitude bounds.
Configures this rectangle by specifying the extreme coordinate values that define the rectangle's boundaries. This method does not validate the input values and the resulting rectangle may be invalid if the bounds are not provided in the correct order.
Parameters
minLat: The minimum (southernmost) latitude value.maxLat: The maximum (northernmost) latitude value.minLon: The minimum (westernmost) longitude value.maxLon: The maximum (easternmost) longitude value.
Implementation
void setFromBounds({
required double minLat,
required double maxLat,
required double minLon,
required double maxLon,
}) {
topLeft = Coordinates(latitude: maxLat, longitude: minLon);
bottomRight = Coordinates(latitude: minLat, longitude: maxLon);
}