triggerTypeFromString static method
Converts a string to a MBTriggerType
.
@param triggerTypeString The string that represents the trigger type.
@returns The MBTriggerType that matches the string, if no match is found it returns MBTriggerType.unknown
.
Implementation
static MBTriggerType triggerTypeFromString(String triggerTypeString) {
switch (triggerTypeString) {
case 'location':
return MBTriggerType.location;
case 'app_opening':
return MBTriggerType.appOpening;
case 'view':
return MBTriggerType.view;
case 'inactive_user':
return MBTriggerType.inactiveUser;
case 'event':
return MBTriggerType.event;
case 'tag_change':
return MBTriggerType.tagChange;
case 'unknown':
return MBTriggerType.unknown;
}
return MBTriggerType.unknown;
}