copyWith method
SimplePrompt<T>
copyWith({
- String? title,
- PromptTheme? theme,
- T? initialValue,
- KeyBindings buildBindings(
- PromptState<
T> state
- PromptState<
- void render(
- FrameContext ctx,
- PromptState<
T> state
- bool? hideCursor,
Creates a copy with modified properties.
Implementation
SimplePrompt<T> copyWith({
String? title,
PromptTheme? theme,
T? initialValue,
KeyBindings Function(PromptState<T> state)? buildBindings,
void Function(FrameContext ctx, PromptState<T> state)? render,
bool? hideCursor,
}) {
return SimplePrompt<T>(
title: title ?? this.title,
theme: theme ?? this.theme,
initialValue: initialValue ?? this.initialValue,
buildBindings: buildBindings ?? this.buildBindings,
render: render ?? this.render,
hideCursor: hideCursor ?? this.hideCursor,
);
}