flutter_password_input 0.6.0 copy "flutter_password_input: ^0.6.0" to clipboard
flutter_password_input: ^0.6.0 copied to clipboard

A customizable password text field widget with Caps Lock detection, visibility toggle, force English input mode, and comprehensive theming support.

0.6.0 #

BREAKING

  • Upgrade just_tooltip from ^0.3.0 to ^0.4.0 — the public PasswordTextField / WarningTooltipTheme API is unchanged, and no just_tooltip API was removed, but a caret on 0.x pins the minor, so apps that depend on just_tooltip directly must move to ^0.4.0

note

  • just_tooltip 0.4.0 lets a nested tooltip suppress its ancestors. WarningTooltipLayout does nest — the caps-lock tooltip wraps the paste tooltip wraps the field — but the suppression path is unreachable here: only a tooltip with enableHover claims its ancestors, and only a claimed ancestor is suppressed. Both tooltips set enableHover: false and are driven entirely by their controllers, so the inner one never claims and a programmatic show() on the outer one always wins. Verified, not assumed: see the new tests below.
  • Warning tooltips also pick up just_tooltip's fix for tooltips laid out in an Overlay that does not fill the window from its origin — a PasswordTextField under a nested Navigator or an embedded Flutter view had its warning tooltip displaced by the Overlay's offset.
  • TooltipAnchor (new in just_tooltip 0.4.0) is not re-exported. These tooltips are anchored to the field and never to a pointer — hover is disabled.

test

  • Add warning_tooltip_layout_test.dart (7 tests), driving WarningTooltipLayout through each PasswordFieldStatus and asserting which tooltip is shown, plus the two facts that keep the nested pair safe — the caps-lock tooltip encloses the paste tooltip, and neither reacts to hover or tap. The existing tooltip coverage (renders in tooltip display mode without error) only asserted that the widget builds; nothing checked that either tooltip ever appeared, so a regression in the nested pair would have passed silently. Both invariant tests are mutation-checked: enabling hover, or swapping the nesting order, makes them fail.

0.5.0 #

BREAKING

  • Upgrade just_tooltip from ^0.2.5 to ^0.3.0 — the public PasswordTextField / WarningTooltipTheme API is unchanged, but apps that depend on just_tooltip directly must move to ^0.3.0

chore

  • Adapt WarningTooltipLayout to the just_tooltip 0.3.0 controller model — JustTooltipController is now an attach-based command source (no longer a ChangeNotifier), so the internal dispose() calls are removed; the paste controller is still recreated on repeat paste to replay its animation
  • Retire the now-obsolete tooltip controller lifecycle tracker and test group (the dispose-balance invariant no longer exists)

0.4.2 #

fix

  • Field status now honors its documented priority (disabled > customError > capsLock > pasteBlocked > checked/unchecked > none) instead of whichever event fired last:
    • A blocked paste no longer overrides an active hasCustomError
    • A disabled field stays disabled even when hasCustomError is set
  • Initial hasCustomError / isChecked are now reflected on the first frame (previously applied only after the value changed)
  • Dispose internal JustTooltipController instances to stop a ChangeNotifier memory leak in tooltip mode (on dispose, on mode switch, and on repeated paste warnings)

feat

  • Add WarningTooltipTheme.defaults static const exposing default tooltip values (parity with PasswordTextFieldTheme.defaults)

chore

  • Internal refactor of PasswordTextField — no behavior change
    • Isolate all flutter_ime interaction (Caps Lock detection, English-input enforcement) behind a KeyboardInputMonitor seam
    • Extract warning rendering into WarningMessageLayout and WarningTooltipLayout widgets, so just_tooltip is used only by the tooltip widget
    • Make _resolveActiveWarning the single source of truth for field status
    • Split build() into _buildTooltipMode / _buildMessageMode
    • Group status border colors into _StatusColors record typedef
    • Extract _applyCapsLockState from duplicated Caps Lock state handlers
    • Extract _buildOutlineBorder helper from repeated focused/enabled/disabled border construction
    • Simplify WarningAlignment → tooltip direction/alignment mapping (10-case → 5-case using || patterns)
    • Consolidate hardcoded 'Caps Lock is on' / 'Paste is disabled' fallback strings into private constants
    • Replace inline tooltip default fallbacks with WarningTooltipTheme.defaults merge
  • Raise line coverage to ~99% (100% across the widget, keyboard monitor, and both warning layout widgets)

deps

  • Upgrade flutter_ime from ^2.1.3 to ^2.1.4

0.4.1 #

feat

  • Add WarningAlignment.topStartTargetCenter, topEndTargetCenter, bottomStartTargetCenter, bottomEndTargetCenter — arrow dynamically points toward the center of the target widget
  • Upgrade just_tooltip from ^0.2.3 to ^0.2.5

0.4.0 #

BREAKING

  • Rename PasswordFieldWarning to PasswordFieldStatus — update all references in prefix/suffix builders and switch expressions
  • PasswordFieldWidgetBuilder parameter renamed from warning to status

feat

  • Add PasswordFieldStatus.checked and PasswordFieldStatus.unchecked — builders receive these states when isChecked is true/false
  • Add isChecked (bool?) to PasswordTextFieldnull applies no checked styling, true/false changes border color accordingly; not intended to be used with hasCustomError
  • Add checkedBorderColor to PasswordTextFieldTheme (falls back to Colors.green)
  • Add uncheckedBorderColor to PasswordTextFieldTheme (falls back to errorBorderColor)

0.3.4 #

feat

  • Add PasswordFieldWarning.disabled — prefix/suffix builders now receive disabled state when enabled: false
  • Add disabledBorderColor to PasswordTextFieldTheme for customizable disabled border color (falls back to borderColor with 50% opacity)
  • Add disabledTextStyle to PasswordTextFieldTheme for customizable disabled text style (falls back to textStyle)
  • Visibility toggle button is now properly disabled when enabled: false

0.3.3 #

deps

  • Upgrade flutter_ime from ^2.1.1 to ^2.1.3 (fix Caps Lock detection miss after app switch)

0.3.2 #

fix

  • Fix hasCustomError state being lost when focus leaves and returns to the field

0.3.1 #

deps

  • Upgrade just_tooltip from ^0.2.1 to ^0.2.3 (bug fix)

0.3.0 #

BREAKING

  • Replace prefixWidget with prefixWidgetBuilder (PasswordFieldWidgetBuilder?) — builder receives (BuildContext, PasswordFieldWarning) so icons can react to warning state
  • Replace suffixWidget with suffixWidgetBuilder (PasswordFieldWidgetBuilder?) — same builder signature

feat

  • Add PasswordFieldWarning enum (none, capsLock, pasteBlocked, customError) representing the active warning
  • Add PasswordFieldWidgetBuilder typedef for prefix/suffix builders
  • Border and floating-label color now uses last-triggered warning semantics instead of fixed priority
  • When an active warning turns off, the field falls back to the next still-active warning via _resolveActiveWarning()

0.2.2 #

feat

  • Add direction and alignment to WarningTooltipTheme for theme-level tooltip positioning (overrides per-warning alignment when set)
  • Add waitDuration to WarningTooltipTheme for delayed tooltip appearance
  • Add showDuration to WarningTooltipTheme for auto-hiding tooltips after a set time
  • Re-export TooltipDirection and TooltipAlignment enums for direct use

0.2.1 #

feat

  • Add prefixIconConstraints and suffixIconConstraints to PasswordTextField for controlling icon size

0.2.0 #

feat

  • Add hasCustomError to PasswordTextField for external error state control (default: false)
    • Changes border color and floating label color when active
    • Works in both focused and unfocused states
  • Add customErrorBorderColor to PasswordTextFieldTheme (falls back to errorBorderColor)

0.1.8 #

fix

  • Fix tooltip alternating issue when both CapsLock and paste warnings are active at the same position
  • Paste tooltip now takes priority over CapsLock tooltip; CapsLock tooltip restores after paste warning expires

feat

  • Paste tooltip animation replays on repeated Ctrl+V press
  • Ignore key repeat events when holding Ctrl+V (only triggers once per key press)

0.1.7 #

feat

  • Add tooltip animation parameters to WarningTooltipTheme:
    • animation: Animation style (none, fade, scale, slide, fadeScale, fadeSlide, rotation)
    • animationCurve: Custom easing curve
    • fadeBegin: Starting opacity for fade animations
    • scaleBegin: Starting scale for scale animations
    • slideOffset: Slide distance ratio for slide animations
    • rotationBegin: Starting rotation for rotation animations
  • Re-export TooltipAnimation enum for direct use

deps

  • Upgrade just_tooltip from ^0.2.0 to ^0.2.1

0.1.6 #

feat

  • Add interactive option to WarningTooltipTheme to control whether tooltip stays visible on hover (default: true)

deps

  • Upgrade just_tooltip from ^0.1.7 to ^0.2.0
  • Migrate tooltip styling parameters to new JustTooltipTheme API (breaking change in just_tooltip 0.2.0)

0.1.5 #

feat

  • Add WarningDisplayMode enum (message, tooltip) to switch warning display between inline text and tooltip
  • Add warningDisplayMode to PasswordTextField (default: message)
  • Tooltip mode uses just_tooltip package with per-warning independent positioning via capsLockWarningAlignment and pasteWarningAlignment
  • Add WarningTooltipTheme class for full tooltip styling customization:
    • backgroundColor, borderRadius, padding, elevation, boxShadow
    • borderColor, borderWidth
    • textStyle, offset, crossAxisOffset, screenMargin
    • animationDuration
    • showArrow, arrowBaseWidth, arrowLength, arrowPositionRatio
  • Add tooltipTheme to PasswordTextFieldTheme
  • Paste warning now hides when focus is lost (consistent with Caps Lock warning behavior)

deps

  • Add just_tooltip: ^0.1.7

0.1.4 #

feat

  • Add WarningAlignment enum with 6 positions (topLeft, topCenter, topRight, bottomLeft, bottomCenter, bottomRight)
  • Add capsLockWarningAlignment and pasteWarningAlignment to PasswordTextField (default: bottomLeft)
  • Add pasteWarningBorderColor to PasswordTextFieldTheme for independent paste warning border/text color (falls back to errorBorderColor)
  • Paste warning now changes border color and floating label color

0.1.3 #

feat

  • Add paste warning message when paste is blocked (disablePaste: true)
    • showPasteWarning: Whether to show warning (default: true)
    • pasteWarningText: Custom warning message (default: 'Paste is disabled')
    • pasteWarningDuration: Auto-hide duration (default: 3 seconds)
    • onPasteBlocked: Callback when paste attempt is blocked
    • Warning auto-hides when user starts typing
  • Add pasteWarningStyle to PasswordTextFieldTheme

0.1.2 #

feat

  • Add disablePaste option to block paste functionality (default: false)
    • Blocks both keyboard shortcuts (Ctrl+V/Cmd+V) and context menu paste

0.1.1 #

feat

  • Add forceEnglishInput option to force English keyboard input when focused (default: true)
    • Windows: Disables IME when focused, re-enables when unfocused
    • macOS: Switches to English keyboard and maintains it while focused
  • Add ExcludeFocus wrapper to visibility toggle button to prevent focus stealing

chore

  • Add macOS platform support to example app
  • Update flutter_ime dependency version

0.1.0 #

feat

  • Add PasswordTextField widget with obscured text input
  • Add Caps Lock detection using flutter_ime package (Windows, macOS supported)
  • Add password visibility toggle button
  • Add prefixWidget and suffixWidget support
  • Add PasswordTextFieldTheme for comprehensive styling customization
  • Add merge() and copyWith() methods for theme manipulation
  • Add interactive playground example app

docs

  • Add detailed English documentation for all public APIs
1
likes
160
points
252
downloads

Documentation

API reference

Publisher

verified publisherkihyun1998.com

Weekly Downloads

A customizable password text field widget with Caps Lock detection, visibility toggle, force English input mode, and comprehensive theming support.

Repository (GitHub)
View/report issues

Topics

#password #textfield #input #caps-lock #security

License

MIT (license)

Dependencies

flutter, flutter_ime, just_tooltip

More

Packages that depend on flutter_password_input