LiveActivityContent.fromJson constructor
- dynamic json
Implementation
factory LiveActivityContent.fromJson(dynamic json) {
final Map<String, Object?> data =
LiveActivity._ensureStringDynamicMap(json);
return LiveActivityContent(
state: LiveActivity._ensureStringDynamicMap(data['state'] ?? {}),
staleDate: data['staleDate'] as String?,
relevanceScore: (data['relevanceScore'] as num?)?.toDouble() ?? 0.0,
);
}