copyWith method
Creates a copy with the given fields replaced.
Implementation
CursorModel copyWith({
Duration? blinkSpeed,
CursorMode? mode,
String? char,
bool? blink,
bool? focus,
int? blinkTag,
Style? style,
Style? textStyle,
}) {
// Copy internal state using a workaround since fields are final
return CursorModel._internal(
blinkSpeed: blinkSpeed ?? this.blinkSpeed,
mode: mode ?? _mode,
char: char ?? _char,
id: _id,
blink: blink ?? _blink,
focus: focus ?? _focus,
blinkTag: blinkTag ?? _blinkTag,
style: style ?? this.style,
textStyle: textStyle ?? this.textStyle,
);
}