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 "group":
_group = toList(value, (item) => MKey.fromJson(item)!);
break;
case "traditionDate":
_traditionDate = value as FlexiDate;
break;
case "traditionType":
_traditionType = value as String;
break;
case "traditionTitle":
_traditionTitle = value as String;
break;
case "description":
_description = value as String;
break;
case "location":
_location = IPhysicalLocation.fromJson(value);
break;
case "emotes":
_emotes = (value as List).cast<String>();
break;
default:
break;
}
}
}