fromJson static method

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

Implementation

static CanSendGiftResult? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  switch (json['@type']) {
    case CanSendGiftResultFail.constructor:
      return CanSendGiftResultFail.fromJson(json);

    case CanSendGiftResultOk.constructor:
      return CanSendGiftResultOk.fromJson(json);

    default:
      return null;
  }
}