WebpushConfig.fromJson constructor

WebpushConfig.fromJson(
  1. Map json_
)

Implementation

WebpushConfig.fromJson(core.Map json_)
    : this(
        data: json_.containsKey('data')
            ? (json_['data'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        fcmOptions: json_.containsKey('fcmOptions')
            ? WebpushFcmOptions.fromJson(
                json_['fcmOptions'] as core.Map<core.String, core.dynamic>)
            : null,
        headers: json_.containsKey('headers')
            ? (json_['headers'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        notification: json_.containsKey('notification')
            ? json_['notification'] as core.Map<core.String, core.dynamic>
            : null,
      );