fromJson static method
Implementation
static EmbeddedInfoUpdatedEvent fromJson(dynamic json) {
List<dynamic> pendingList = json['pending'] as List? ?? [];
List<EmbeddedInfo> embeddedInfos = pendingList
.map((item) => EmbeddedInfo(
item['embeddedId'] as String,
item['instanceId'] as String,
// Crosses the platform channel as a double, so widen before
// narrowing rather than casting straight to int.
(item['priority'] as num?)?.toInt() ?? 0,
Map<String, dynamic>.from(item['extras'] ?? {}),
))
.toList();
return EmbeddedInfoUpdatedEvent(embeddedInfos);
}