getInteractionType function

String getInteractionType(
  1. InteractionTypes type
)

Implementation

String getInteractionType(InteractionTypes type) {
  switch (type) {
    case InteractionTypes.impression:
      return 'impression';
    case InteractionTypes.click:
      return 'click';
    case InteractionTypes.search:
      return 'search';
    case InteractionTypes.widgetView:
      return 'widget-view';
    default:
      throw Exception('Interaction type is not defined.');
  }
}