deserialize method
void
deserialize(
- Map<String, dynamic>? json
)
override
Implementation
@override
void deserialize(Map<String, dynamic>? json) {
if (json == null) {
throw ApiException(
400, 'Failed to deserialize FormFieldDropDown data model.');
}
super.deserialize(json);
if (json.containsKey('Link')) {
link = ModelBase.createInstance<WordsApiLink>(
json['Link'] as Map<String, dynamic>);
} else {
link = null;
}
if (json.containsKey('NodeId')) {
nodeId = json['NodeId'] as String;
} else {
nodeId = null;
}
if (json.containsKey('Name')) {
name = json['Name'] as String;
} else {
name = null;
}
if (json.containsKey('Enabled')) {
enabled = json['Enabled'] as bool;
} else {
enabled = null;
}
if (json.containsKey('StatusText')) {
statusText = json['StatusText'] as String;
} else {
statusText = null;
}
if (json.containsKey('OwnStatus')) {
ownStatus = json['OwnStatus'] as bool;
} else {
ownStatus = null;
}
if (json.containsKey('HelpText')) {
helpText = json['HelpText'] as String;
} else {
helpText = null;
}
if (json.containsKey('OwnHelp')) {
ownHelp = json['OwnHelp'] as bool;
} else {
ownHelp = null;
}
if (json.containsKey('CalculateOnExit')) {
calculateOnExit = json['CalculateOnExit'] as bool;
} else {
calculateOnExit = null;
}
if (json.containsKey('EntryMacro')) {
entryMacro = json['EntryMacro'] as String;
} else {
entryMacro = null;
}
if (json.containsKey('ExitMacro')) {
exitMacro = json['ExitMacro'] as String;
} else {
exitMacro = null;
}
if (json.containsKey('DropDownItems')) {
// Array processing
dropDownItems = <String>[];
for (final _element in json['DropDownItems']) {
dropDownItems!.add(_element as String);
}
} else {
dropDownItems = null;
}
if (json.containsKey('DropDownSelectedIndex')) {
dropDownSelectedIndex = json['DropDownSelectedIndex'] as int;
} else {
dropDownSelectedIndex = null;
}
}