SessionType.fromJson constructor

SessionType.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SessionType.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case SessionTypeAndroid.CONSTRUCTOR:
      return SessionTypeAndroid.fromJson(json);
    case SessionTypeApple.CONSTRUCTOR:
      return SessionTypeApple.fromJson(json);
    case SessionTypeBrave.CONSTRUCTOR:
      return SessionTypeBrave.fromJson(json);
    case SessionTypeChrome.CONSTRUCTOR:
      return SessionTypeChrome.fromJson(json);
    case SessionTypeEdge.CONSTRUCTOR:
      return SessionTypeEdge.fromJson(json);
    case SessionTypeFirefox.CONSTRUCTOR:
      return SessionTypeFirefox.fromJson(json);
    case SessionTypeIpad.CONSTRUCTOR:
      return SessionTypeIpad.fromJson(json);
    case SessionTypeIphone.CONSTRUCTOR:
      return SessionTypeIphone.fromJson(json);
    case SessionTypeLinux.CONSTRUCTOR:
      return SessionTypeLinux.fromJson(json);
    case SessionTypeMac.CONSTRUCTOR:
      return SessionTypeMac.fromJson(json);
    case SessionTypeOpera.CONSTRUCTOR:
      return SessionTypeOpera.fromJson(json);
    case SessionTypeSafari.CONSTRUCTOR:
      return SessionTypeSafari.fromJson(json);
    case SessionTypeUbuntu.CONSTRUCTOR:
      return SessionTypeUbuntu.fromJson(json);
    case SessionTypeUnknown.CONSTRUCTOR:
      return SessionTypeUnknown.fromJson(json);
    case SessionTypeVivaldi.CONSTRUCTOR:
      return SessionTypeVivaldi.fromJson(json);
    case SessionTypeWindows.CONSTRUCTOR:
      return SessionTypeWindows.fromJson(json);
    case SessionTypeXbox.CONSTRUCTOR:
      return SessionTypeXbox.fromJson(json);
    default:
      return const SessionType();
  }
}