UserStatus.fromJson constructor

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

Implementation

factory UserStatus.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case UserStatusEmpty.CONSTRUCTOR:
      return UserStatusEmpty.fromJson(json);
    case UserStatusOnline.CONSTRUCTOR:
      return UserStatusOnline.fromJson(json);
    case UserStatusOffline.CONSTRUCTOR:
      return UserStatusOffline.fromJson(json);
    case UserStatusRecently.CONSTRUCTOR:
      return UserStatusRecently.fromJson(json);
    case UserStatusLastWeek.CONSTRUCTOR:
      return UserStatusLastWeek.fromJson(json);
    case UserStatusLastMonth.CONSTRUCTOR:
      return UserStatusLastMonth.fromJson(json);
    default:
      return const UserStatus();
  }
}