fromList static method

  1. @visibleForTesting
LatLngBounds? fromList(
  1. Object? json
)

Converts a list to LatLngBounds.

Implementation

@visibleForTesting
static LatLngBounds? fromList(Object? json) {
  if (json == null) {
    return null;
  }
  assert(json is List && json.length == 2);
  final List<Object?> list = json as List<Object?>;
  return LatLngBounds(
    southwest: LatLng.fromJson(list[0])!,
    northeast: LatLng.fromJson(list[1])!,
  );
}