DropDownResponse.fromJson constructor
Implementation
DropDownResponse.fromJson(Map<String, dynamic> json) {
final originalText = json['Text'] ?? '';
final cleanText = originalText.replaceAll(RegExp(r'[\r\n]+'), '').trim();
value = json['Value'];
mappingId = json['mappingId'];
parentId = json['parentId'];
secondaryText = json['secondaryText'] ?? '';
text = cleanText.isEmpty ? null : cleanText; // mark as null if blank
}