copyWith method

VoiceOptions copyWith({
  1. bool? enabled,
  2. IconData? voiceIcon,
  3. IconData? keyboardIcon,
  4. Color? voiceIconColor,
  5. double? voiceIconSize,
  6. String? tooltip,
  7. void onVoiceState(
    1. bool isVoice
    )?,
  8. int? maxFilesPerMessage,
  9. int? maxFileSize,
  10. List<String>? allowedFileTypes,
  11. Widget customVoiceButtonBuilder(
    1. BuildContext,
    2. VoidCallback
    )?,
})

Creates a copy of this FileUploadOptions with the given fields replaced with new values

Implementation

VoiceOptions copyWith({
  bool? enabled,
  IconData? voiceIcon,
  IconData? keyboardIcon,
  Color? voiceIconColor,
  double? voiceIconSize,
  String? tooltip,
  void Function(bool isVoice)? onVoiceState,
  int? maxFilesPerMessage,
  int? maxFileSize,
  List<String>? allowedFileTypes,
  Widget Function(BuildContext, VoidCallback)? customVoiceButtonBuilder,
}) =>
    VoiceOptions(
      enabled: enabled ?? this.enabled,
      voiceIcon: voiceIcon ?? this.voiceIcon,
      keyboardIcon: keyboardIcon ?? this.keyboardIcon,
      voiceIconColor: voiceIconColor ?? this.voiceIconColor,
      voiceIconSize: voiceIconSize ?? this.voiceIconSize,
      tooltip: tooltip ?? this.tooltip,
      onVoiceState: onVoiceState ?? this.onVoiceState,
      maxFilesPerMessage: maxFilesPerMessage ?? this.maxFilesPerMessage,
      maxFileSize: maxFileSize ?? this.maxFileSize,
      allowedFileTypes: allowedFileTypes ?? this.allowedFileTypes,
    );