CameraInfo.fromMap constructor

CameraInfo.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory CameraInfo.fromMap(Map<String, dynamic> map) {
  return CameraInfo(
    id: map['id'],
    orientation: map['orientation'],
    facing: Facing.values.firstWhere(
      (Facing facing) => facing.toString() == map['facing'],
    ),
  );
}