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 "recipient": _recipient = value as String; break;
case "isUserId": _isUserId = value as bool; break;
case "isNativePush": _isNativePush = value as bool; break;
case "notification": _notification = INotification.fromJson(value); break;
case "body": _body = IMessageBody.fromJson(value); break;
case "type": _type = IPushMessageType.fromJson(value); break;
default: break;
}
}
}