LiveActivity.fromJson constructor
- dynamic json
Implementation
factory LiveActivity.fromJson(dynamic json) {
final Map<String, Object?> data = _ensureStringDynamicMap(json);
return LiveActivity(
id: data['id'] as String? ?? '',
attributeTypes: data['attributeTypes'] as String? ?? '',
content: LiveActivityContent.fromJson(data['content']),
attributes: _ensureStringDynamicMap(data['attributes'] ?? {}),
state: data['state'] as String? ?? '',
);
}