toJson method

  1. @override
Map<String, dynamic> toJson()
override

Creates a PassportElementErrorDataField object from JSON object

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    'source': source,
    'type': type.value,
    'message': message,
    'field_name': fieldName,
    'data_hash': dataHash,
  }..removeWhere(_nullFilter);
}