text static method
Creates a text input prompt with optional validation.
final name = SyncPrompts.text(
title: 'Enter name',
placeholder: 'Your name...',
required: true,
).run();
Implementation
static TextPromptSync text({
required String title,
String? placeholder,
String? Function(String)? validator,
bool required = false,
PromptTheme theme = PromptTheme.dark,
}) {
return TextPromptSync(
title: title,
theme: theme,
placeholder: placeholder,
validator: validator,
required: required,
);
}