copyWith method

OverlayConfig copyWith({
  1. bool? autoShow,
  2. int? autoHideDuration,
  3. bool? enableVibration,
  4. String? bubbleColor,
  5. double? bubbleSize,
  6. double? bubbleOpacity,
  7. bool? enableSpellCheck,
  8. bool? enableGrammarCheck,
  9. int? initialX,
  10. int? initialY,
})

Creates a copy of this config with the given fields replaced.

Implementation

OverlayConfig copyWith({
  bool? autoShow,
  int? autoHideDuration,
  bool? enableVibration,
  String? bubbleColor,
  double? bubbleSize,
  double? bubbleOpacity,
  bool? enableSpellCheck,
  bool? enableGrammarCheck,
  int? initialX,
  int? initialY,
}) {
  return OverlayConfig(
    autoShow: autoShow ?? this.autoShow,
    autoHideDuration: autoHideDuration ?? this.autoHideDuration,
    enableVibration: enableVibration ?? this.enableVibration,
    bubbleColor: bubbleColor ?? this.bubbleColor,
    bubbleSize: bubbleSize ?? this.bubbleSize,
    bubbleOpacity: bubbleOpacity ?? this.bubbleOpacity,
    enableSpellCheck: enableSpellCheck ?? this.enableSpellCheck,
    enableGrammarCheck: enableGrammarCheck ?? this.enableGrammarCheck,
    initialX: initialX ?? this.initialX,
    initialY: initialY ?? this.initialY,
  );
}