fromMap static method
从Map转换成CameraPosition
主要在插件内部使用
Implementation
static CameraPosition? fromMap(dynamic 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'],
target: target,
tilt: json['tilt'],
zoom: json['zoom'],
);
}