fromJson static method

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

Implementation

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

  return ChatBoostSourceGiftCode(
    userId: (json['user_id'] as int?) ?? 0,
    giftCode: (json['gift_code'] as String?) ?? '',
  );
}