Event.fromJson constructor
Implementation
factory Event.fromJson(Map<String, dynamic> json) {
final eventName = json['eventName'];
switch (eventName) {
case GO_TO_AUTO_PAYMENT:
return AutoPaymentEvent();
case GO_TO_PAYMENT:
return PaymentEvent();
case TRIVIA_FINISHED:
return TriviaFinishedEvent.from(json);
case RETRY_LOGIN:
return RetryLoginEvent.from(json);
case GO_BACK:
return BackEvent.from(json);
case BACK_BUTTON_PRESSED:
return BackButtonPressedEvent.from(json);
case TRIVIA_GAME_FINISHED:
return TriviaGameFinishedEvent.from(json);
case TRIVIA_CLOSED:
return TriviaCloseEvent.from(json);
case REFERRAL_COPY:
return ReferralCopyEvent.from(json);
case GIFT_CARD_COPY:
return ReferralCopyEvent.from(json);
case HOME_BANNER_ACTION:
return HomeBannerActionEvent.from(json);
case MISSION_ACTION:
return MissionActionEvent.from(json);
default:
return GenericEvent.from(json);
}
}