copyWith method

TextCompositionStyle copyWith({
  1. String? name,
  2. int? customEmojiId,
  3. String? title,
  4. bool? isCustom,
  5. bool? isCreator,
  6. int? installCount,
  7. String? prompt,
  8. int? creatorUserId,
  9. TextCompositionStyleExample? englishExample()?,
  10. dynamic extra,
  11. int? clientId,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

TextCompositionStyle copyWith({
  String? name,
  int? customEmojiId,
  String? title,
  bool? isCustom,
  bool? isCreator,
  int? installCount,
  String? prompt,
  int? creatorUserId,
  TextCompositionStyleExample? Function()? englishExample,
  dynamic extra,
  int? clientId,
}) => TextCompositionStyle(
  name: name ?? this.name,
  customEmojiId: customEmojiId ?? this.customEmojiId,
  title: title ?? this.title,
  isCustom: isCustom ?? this.isCustom,
  isCreator: isCreator ?? this.isCreator,
  installCount: installCount ?? this.installCount,
  prompt: prompt ?? this.prompt,
  creatorUserId: creatorUserId ?? this.creatorUserId,
  englishExample: englishExample != null
      ? englishExample()
      : this.englishExample,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);