takeFromMap method
Used for meta-forms in setting deep properties
Implementation
@override
void takeFromMap(Map<String, dynamic>? from, {bool copyEntries = true}) {
if (from == null) return;
super.takeFromMap(from, copyEntries: copyEntries);
for (final entry in from.entries) {
final key = entry.key;
final value = entry.value;
if (value == null) continue;
switch(key) {
case "contactKey": _contactKey = MKey.fromJson(value); break;
case "company": _company = IEmployer.fromJson(value); break;
case "position": _position = value as String; break;
case "workPhone": _workPhone = IPhoneWithExtension.fromJson(value); break;
case "startDate": _startDate = value as FlexiDate; break;
case "endDate": _endDate = value as FlexiDate; break;
default: break;
}
}
}