PasswordPromptExtensions extension

Password prompt with masking, optional reveal toggle, and theme-aware status hints.

Controls:

  • Type to enter characters (displayed as maskChar)
  • Backspace deletes
  • Enter confirms
  • Esc cancels (returns null)
  • Optional reveal hotkey (when allowReveal is true)

When verify is true, a second "Verify password" field is shown alongside the main field inside a single frame. Both must match to confirm.

final apiKey = terminice.password(
  'API key',
  maskChar: '*',
  allowReveal: false,
);

final secret = terminice.password(
  'New password',
  verify: true,
);
on

Methods

password(String prompt, {bool required = true, String maskChar = '•', bool allowReveal = true, bool verify = false}) String?

Available on Terminice, provided by the PasswordPromptExtensions extension

Password input prompt with masking options and a required flag.