fromMap static method

CameraPosition? fromMap(
  1. Object? json
)

Deserializes CameraPosition from a map.

Mainly for internal use.

Implementation

static CameraPosition? fromMap(Object? json) {
  if (json == null || json is! Map<dynamic, dynamic>) {
    return null;
  }
  final LatLng? target = LatLng.fromJson(json['target']);
  if (target == null) {
    return null;
  }
  return CameraPosition(
    bearing: json['bearing'] as double,
    target: target,
    tilt: json['tilt'] as double,
    zoom: json['zoom'] as double,
  );
}