toMap method

Map<String, dynamic> toMap()

toMap is the method to convert the class to a map.

Implementation

Map<String, dynamic> toMap() {
  return {
    'cameras': cameras.map((x) => x.toMap()).toList(),
  };
}