BackgroundServiceEvent.fromJson constructor
Implementation
factory BackgroundServiceEvent.fromJson(Map<String, dynamic> json) {
return BackgroundServiceEvent(
timestamp: network.TimeSinceEpoch.fromJson(json['timestamp'] as num),
origin: json['origin'] as String,
serviceWorkerRegistrationId: service_worker.RegistrationID.fromJson(
json['serviceWorkerRegistrationId'] as String),
service: ServiceName.fromJson(json['service'] as String),
eventName: json['eventName'] as String,
instanceId: json['instanceId'] as String,
eventMetadata: (json['eventMetadata'] as List)
.map((e) => EventMetadata.fromJson(e as Map<String, dynamic>))
.toList(),
storageKey: json['storageKey'] as String,
);
}