fromJson static method

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

Implementation

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

  return GiftSettings(
    showGiftButton: (json['show_gift_button'] as bool?) ?? false,
    acceptedGiftTypes: AcceptedGiftTypes.fromJson(
      tdMapFromJson(json['accepted_gift_types']),
    ),
  );
}