password static method

TextPromptSync password({
  1. required String title,
  2. bool required = true,
  3. bool allowReveal = true,
  4. String maskChar = '•',
  5. PromptTheme theme = PromptTheme.dark,
})

Creates a password input prompt with masking.

final password = SyncPrompts.password(
  title: 'Enter password',
  required: true,
).run();

Implementation

static TextPromptSync password({
  required String title,
  bool required = true,
  bool allowReveal = true,
  String maskChar = '•',
  PromptTheme theme = PromptTheme.dark,
}) {
  return TextPromptSync(
    title: title,
    theme: theme,
    masked: true,
    maskChar: maskChar,
    allowReveal: allowReveal,
    required: required,
  );
}