Message.fromJson constructor
Message.fromJson(
- Map _json
Implementation
Message.fromJson(core.Map _json)
: this(
android: _json.containsKey('android')
? AndroidConfig.fromJson(
_json['android'] as core.Map<core.String, core.dynamic>)
: null,
apns: _json.containsKey('apns')
? ApnsConfig.fromJson(
_json['apns'] as core.Map<core.String, core.dynamic>)
: null,
condition: _json.containsKey('condition')
? _json['condition'] as core.String
: null,
data: _json.containsKey('data')
? (_json['data'] as core.Map<core.String, core.dynamic>).map(
(key, item) => core.MapEntry(
key,
item as core.String,
),
)
: null,
fcmOptions: _json.containsKey('fcmOptions')
? FcmOptions.fromJson(
_json['fcmOptions'] as core.Map<core.String, core.dynamic>)
: null,
name: _json.containsKey('name') ? _json['name'] as core.String : null,
notification: _json.containsKey('notification')
? Notification.fromJson(
_json['notification'] as core.Map<core.String, core.dynamic>)
: null,
token:
_json.containsKey('token') ? _json['token'] as core.String : null,
topic:
_json.containsKey('topic') ? _json['topic'] as core.String : null,
webpush: _json.containsKey('webpush')
? WebpushConfig.fromJson(
_json['webpush'] as core.Map<core.String, core.dynamic>)
: null,
);