toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  final Map<String, dynamic> data = <String, dynamic>{};
  if (id != null) {
    data['id'] = id;
  }
  if (type != null) {
    data['type'] = type?.type;
  }
  return data;
}