MBTrigger.fromDictionary constructor

MBTrigger.fromDictionary(
  1. Map<String, dynamic> dictionary
)

Initializes a trigger with the data of the dictionary returned by the APIs. The type of trigger is set to MBTriggerType.unknown.

Implementation

factory MBTrigger.fromDictionary(Map<String, dynamic> dictionary) {
  String id = dictionary['id'];
  return MBTrigger(
    id: id,
    triggerType: MBTriggerType.unknown,
  );
}