toMap method
Implementation
@override
Map<String, Object?> toMap() {
final data = <String, Object?>{
'name': name,
'id': id,
'type': type,
'previousName': previousName,
'previousType': previousType,
'previousId': previousId,
'transitionType': transitionType,
};
data.removeWhere((key, value) => value == null);
return data;
}