PusherData.fromJson constructor

PusherData.fromJson(
  1. Map<String, Object?> json
)

Implementation

PusherData.fromJson(Map<String, Object?> json)
  : format = ((v) => v != null ? v as String : null)(json['format']),
    url = ((v) => v != null ? Uri.parse(v as String) : null)(json['url']),
    additionalProperties = Map.fromEntries(
      json.entries
          .where((e) => !['format', 'url'].contains(e.key))
          .map((e) => MapEntry(e.key, e.value as Object?)),
    );