fromMap static method

CanTransferOwnershipResult? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static CanTransferOwnershipResult? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  switch (_) {
    case 'canTransferOwnershipResultPasswordNeeded':
      return CanTransferOwnershipResultPasswordNeeded.fromMap(_map);
    case 'canTransferOwnershipResultPasswordTooFresh':
      return CanTransferOwnershipResultPasswordTooFresh.fromMap(_map);
    case 'canTransferOwnershipResultOk':
      return CanTransferOwnershipResultOk.fromMap(_map);
    case 'canTransferOwnershipResultSessionTooFresh':
      return CanTransferOwnershipResultSessionTooFresh.fromMap(_map);
    case null:
    default:
      return null;
  }
}