toJson method

Map<String, dynamic> toJson()

Converts this settings object into a JSON map.

Implementation

Map<String, dynamic> toJson() {
  return {
    'theme': theme.toJson(),
    'mediaTypeConfig': mediaTypeConfig
        .map((e) => GiphyContentTypeExtension.toStringValue(e))
        .toList(),
    'showConfirmationScreen': showConfirmationScreen,
    'rating': GiphyRatingExtension.toStringValue(rating),
    'renditionType': renditionType != null
        ? GiphyRenditionUtil.toStringValue(renditionType)
        : null,
    'clipsPreviewRenditionType': clipsPreviewRenditionType != null
        ? GiphyRenditionUtil.toStringValue(clipsPreviewRenditionType)
        : null,
    'confirmationRenditionType': confirmationRenditionType != null
        ? GiphyRenditionUtil.toStringValue(confirmationRenditionType)
        : null,
    'showCheckeredBackground': showCheckeredBackground,
    'stickerColumnCount': stickerColumnCount,
    'selectedContentType':
        GiphyContentTypeExtension.toStringValue(selectedContentType),
    'showSuggestionsBar': showSuggestionsBar,
    'enableDynamicText': enableDynamicText,
    'fileFormat': GiphyFileFormatExtension.toStringValue(fileFormat),
    'disableEmojiVariations': disableEmojiVariations,
  };
}