AdjustRemoteTrigger.fromMap constructor
AdjustRemoteTrigger.fromMap(
- dynamic map
Implementation
factory AdjustRemoteTrigger.fromMap(dynamic map) {
try {
if (map == null || map is! Map) {
throw Exception('Input map is null or has unexpected type.');
}
final String? label = map['label'];
final dynamic payload = map['payload'];
if (label == null) {
throw Exception('Missing required remote trigger label.');
}
return AdjustRemoteTrigger(
label: label,
payload: _castPayload(payload),
);
} catch (e) {
throw Exception(
'[AdjustFlutter]: Failed to create AdjustRemoteTrigger object from given map object. Details: ' +
e.toString());
}
}