Emoji constructor

  1. @JsonSerializable(includeIfNull: false)
const Emoji({
  1. @JsonKey(name: 'shortcode') required String code,
  2. required String url,
  3. String? staticUrl,
  4. @JsonKey(name: 'visible_in_picker') required bool isVisibleInPicker,
  5. String? category,
})

Implementation

@JsonSerializable(includeIfNull: false)
const factory Emoji({
  /// The name of the custom emoji.
  @JsonKey(name: 'shortcode') required String code,

  /// A link to the custom emoji.
  required String url,

  /// A link to a static copy of the custom emoji.
  String? staticUrl,

  /// Whether this Emoji should be visible in the picker or unlisted.
  @JsonKey(name: 'visible_in_picker') required bool isVisibleInPicker,

  /// Used for sorting custom emoji in the picker.
  String? category,
}) = _Emoji;