CanTransferOwnershipResult.fromJson constructor

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

Implementation

factory CanTransferOwnershipResult.fromJson(Map<String, dynamic> json)  {
  switch(json["@type"]) {
    case CanTransferOwnershipResultOk.CONSTRUCTOR:
      return CanTransferOwnershipResultOk.fromJson(json);
    case CanTransferOwnershipResultPasswordNeeded.CONSTRUCTOR:
      return CanTransferOwnershipResultPasswordNeeded.fromJson(json);
    case CanTransferOwnershipResultPasswordTooFresh.CONSTRUCTOR:
      return CanTransferOwnershipResultPasswordTooFresh.fromJson(json);
    case CanTransferOwnershipResultSessionTooFresh.CONSTRUCTOR:
      return CanTransferOwnershipResultSessionTooFresh.fromJson(json);
    default:
      return const CanTransferOwnershipResult();
  }
}