fromJson static method

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

Implementation

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

  return GiftChatThemes(
    themes: List<GiftChatTheme>.from(
      tdListFromJson(json['themes'])
          .map((item) => GiftChatTheme.fromJson(tdMapFromJson(item)))
          .whereType<GiftChatTheme>(),
    ),
    nextOffset: (json['next_offset'] as String?) ?? '',
  );
}