toMap method
Implementation
@override
Map<String, Object?> toMap() {
final data = <String, Object?>{
'errorCode': errorCode,
'errorName': errorName,
'errorDescription': errorDescription,
};
data.removeWhere((key, value) => value == null);
return data;
}