MBTrigger.fromJsonDictionary constructor
Initializes a trigger from a JSON dictionary. @param dictionary The JSON dictionary.
Implementation
factory MBTrigger.fromJsonDictionary(Map<String, dynamic> dictionary) {
String id = dictionary['id'];
String triggerTypeString = dictionary['type'];
MBTriggerType triggerType =
MBTrigger.triggerTypeFromString(triggerTypeString);
return MBTrigger(
id: id,
triggerType: triggerType,
);
}