Skip to main content

flutter_password_input 0.8.0 copy "flutter_password_input: ^0.8.0" to clipboard
flutter_password_input: ^0.8.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.8.0 #

Breaking — SDK floor

  • Flutter floor raised 3.13.0 → 3.32.0, Dart floor 3.4.0 → 3.8.0. just_tooltip 0.5.0 positions a tooltip during layout through OverlayPortal.overlayChildLayoutBuilder, which needs Flutter 3.32. An app on an older Flutter cannot resolve this release and stays on 0.7.0. This is the breaking part of the upgrade: the release that ships it is not a patch.

DEPS

  • just_tooltip: ^0.5.1 (was ^0.4.4). 0.5.0 deprecates enableTap; the warning tooltips no longer pass it and still have no tap trigger. No API of this package changed.

Behaviour change — tooltip mode only

  • A screen reader does not hear a warning tooltip on the field. just_tooltip 0.5.1 puts a tooltip's text on its child's semantics even while it is not shown, which would have made the field read as "Paste is disabled" at all times. Both warning tooltips are built with excludeFromSemantics: true, so the field reads as it did. The cost: showing a warning is not announced (just_tooltip announces a shown tooltip, honoured on Android). The bubble's text is on the semantics tree while it is on screen.
  • Escape closes a warning tooltip that is on screen (just_tooltip 0.5.1). The field holds focus inside the tooltip, so that Escape is consumed: an enclosing dialog or route closes on the next press, not this one. The warning stays closed while it holds, until it fires again (another blocked paste) or the field rebuilds for another reason — a rebuild of the widget above it, for example — which shows it again.
  • A warning tooltip follows a scrolling or resizing field in the same frame; it was re-aimed one frame late.
  • A warning tooltip now draws with the Directionality, Theme, DefaultTextStyle and MediaQuery around the field, not those above the app's Overlay: an RTL section mirrors it and a local text scale reaches its text.
  • In RTL, with showArrow, the arrow of a warning aligned to a left or right edge (topLeft, bottomRight, …) now points at the field; it pointed past it.
  • A positive WarningTooltipTheme.crossAxisOffset now moves a topEndTargetCenter / bottomEndTargetCenter warning inward, as it does for topRight / bottomRight (in RTL this includes the StartTargetCenter ones). A value tuned against the old direction now shifts the other way: flip its sign.
  • A tap on a warning tooltip reaches the widget beneath it; the non-interactive bubble is transparent to the pointer.

Fix

  • disablePaste now blocks the context menu's Paste (long-press toolbar, right-click menu), as its documentation always said. Tapping it leaves the text unchanged, calls onPasteBlocked once per attempt and shows the paste warning, exactly like a blocked Ctrl+V/Cmd+V. Before, the menu pasted the clipboard into the field silently (#17).
  • With disablePaste, iOS shows the Flutter-rendered context menu instead of the native system menu, whose Paste the platform handles out of the field's reach. Fields without disablePaste are unchanged.
  • A blocked keyboard paste that arrives without V held (macOS Edit menu Paste, or after a V key-up was lost to another window) is always reported. Before, it could leave the key-repeat guard set and silently swallow the next blocked paste. Holding Ctrl+V/Cmd+V still reports once.
  • A warning tooltip with showDuration now hides on time even when the mouse rests on or crosses it. Before, the pointer cancelled the auto-hide and the tooltip stayed until the status changed. Warning tooltips are always built non-interactive; WarningTooltipTheme.interactive is kept so existing themes compile, and has no effect, as documented (#19).
  • Changing forceEnglishInput while the field is focused takes effect at once, and leaving the field always undoes what was enforced. Before, turning it off while focused skipped the restore on blur, leaving the Windows IME disabled system-wide and the macOS English-forcing watcher running (#18).
  • A Caps Lock reading that arrives after the field lost focus, or from an earlier focus, is discarded. Before, a quick tab through the field could report onCapsLockStateChanged(true) after blur with no false following (#18).
  • Changing showCapsLockWarning at runtime re-resolves the field status at once. Before, turning it off while Caps Lock was on left the border colour, tooltip and builders in the caps-lock state until the next event (#18).
  • Swapping focusNode at runtime disposes the node the field created (it leaked before) and never a node the caller supplied. Swapping while focused to an unfocused node now runs the usual focus-lost handling: Caps Lock reported false, IME restored (#18).
  • A field disposed while focused (for example on a route pop) restores the input it enforced. Before, the Windows IME stayed disabled system-wide.
  • A disabled field's text is drawn in the theme's disabled colour when disabledTextStyle is not set, as documented. Before, the text kept its textStyle (or bodyMedium) colour and looked the same as an enabled field. Set disabledTextStyle to choose another look.

Docs

  • disablePaste now states that a screen reader's paste action (TalkBack, VoiceOver) is not blocked: Flutter performs it inside EditableText with no hook the field can intercept (#20).

0.7.0 #

DEPS

  • flutter_ime: ^3.0.0 (was ^2.1.4). 3.0.0 rewrites the plugin as a pure-Dart FFI package: no native code, no plugin registration, and no Flutter dependency of its own. For this package that means the generated plugin registrant no longer references flutter_ime and a consumer app compiles no native IME code — nothing here calls anything the plugin's C++/Swift layer used to provide.

Breaking — SDK floor

  • Dart floor raised 3.1.0 → 3.4.0. flutter_ime 3.0.0 bridges its macOS input-source observer with NativeCallable.keepIsolateAlive, which arrived in Dart 3.4. The Flutter floor is unchanged at 3.13.0. This is the only breaking part of the upgrade, and it is what makes it a minor bump rather than a patch.

No API or behaviour change here

  • flutter_ime 3.0.0 keeps the same public API — every function has the same name, parameters and return type — so KeyboardInputMonitor is untouched and no call site changed. The keyboard-integration tests pass unchanged against the new version through the same platform-interface seam.

Worth knowing (macOS, upstream)

  • 3.0.0 fixes flutter_ime's macOS layout classification: non-QWERTY English layouts (Dvorak, Colemak, British, Australian, Canadian) now report as English, where 2.x saw only ABC and US. A field forcing English no longer drags those users onto ABC.
  • On macOS the Caps Lock warning can now flicker when the user switches language: the Caps Lock key doubles as the input-source switch there, so a language change briefly toggles the lock and onCapsLockChanged reports it. This is upstream behaviour, not something this package can filter — there is no state that separates the two, only duration.

0.6.3 #

DEPS

  • just_tooltip: ^0.4.4 (was ^0.4.3). Upstream lands two fixes: an empty-message tooltip no longer suppresses the tooltips nested around it (#46), and a tooltip already on screen now rebuilds to follow its own message, theme, direction, or alignment when they change mid-show (#47). No just_tooltip API changed and the Flutter/Dart floor is unchanged at 3.13.0 / 3.1.0.

Behaviour change — narrow, tooltip mode only

  • The suppression fix (#46) is unreachable here, for the same reason as 0.6.0/0.6.2: it is claimed from the hover path (MouseRegion.onEnter) or from a message toggling empty↔non-empty, and these tooltips pass enableHover: false (no MouseRegion is built) and carry fixed, non-empty messages that never toggle. Nothing in WarningTooltipLayout can reach it.
  • The config-follow fix (#47) is reachable. WarningTooltipLayout.build() rebuilds each JustTooltip with freshly-resolved tooltipTheme / alignment / message, and 0.4.4's didUpdateWidget now marks a shown overlay dirty on any such rebuild. So if a caps-lock or paste warning tooltip's theme, alignment, or text changes while it is on screen, the visible tooltip now updates on the next frame; before 0.4.4 it kept the stale overlay until the warning was hidden and shown again. This only affects an already-displayed tooltip whose configuration actually changes mid-show — a latent correctness improvement, not a regression.

0.6.2 #

DEPS

  • just_tooltip: ^0.4.3 (was ^0.4.2). Upstream fixes a hover bug: moving the cursor from the tooltip body back onto its child left an armed hide timer, which then faded the tooltip out while the pointer was resting on the child, with no further onEnter to revive it.

No behaviour change here

  • That fix is unreachable from this package, for the same reason 0.6.0's nested-suppression path was: WarningTooltipLayout passes enableHover: false to both tooltips unconditionally. just_tooltip gates the whole hover path on it — it builds no MouseRegion, and its hover reconciler short-circuits before the repaired scheduler call. The warnings are driven only by JustTooltipController, so nothing in 0.4.3 can reach them.
  • No just_tooltip API changed between 0.4.2 and 0.4.3 (the only other diff is a doc comment on interactive), and the Flutter/Dart floor is unchanged at 3.13.0 / 3.1.0.

docs

  • WarningTooltipTheme.interactive and WarningTooltipTheme.waitDuration are documented as having no effect, in both the README table and their dartdoc. just_tooltip reads both only along its hover path, and these tooltips pass enableHover: false, so no pointer event ever reaches the scheduler. Previously the README advertised them as "Keep tooltip visible on hover" and "Delay before tooltip appears". They stay in the API so the theme remains a superset of just_tooltip's options.
  • showDuration is not affected and keeps working: JustTooltip.showTooltip() starts the auto-hide countdown explicitly for a programmatic show.

0.6.1 #

DEPS

  • just_tooltip: ^0.4.2 (was ^0.4.0). Upstream anchors a tooltip to the visible part of its child, re-aims it whenever the child moves, and hides it once the child is clipped out of sight.

Behaviour change for WarningDisplayMode.tooltip

  • The caps-lock and paste warnings are shown through JustTooltipController, so they inherit the new tracking. A warning no longer stays where its field used to be when a surrounding view scrolls, resizes, or reflows — it re-aims at the visible part of the field. It does not move rigidly with the field: measured in a 400px horizontal viewport, scrolling by 60px moved the field's centre by 60px and the warning by 32px, because the warning aims at the visible centre and is still clamped by screenMargin.
  • A warning whose field scrolls entirely out of view now hides, where before it stayed on screen pointing at nothing. Showing it again is a fresh controller.show().

Requires Flutter 3.13

  • Minimum Flutter is now 3.13.0 (Dart 3.1.0), up from 3.3.0. just_tooltip 0.4.2 walks RenderObject.parent, which was AbstractNode? — a type with no describeApproximatePaintClip — before Flutter 3.13.
  • This is a correction, not a new restriction. The just_tooltip: ^0.4.0 constraint in 0.6.0 already resolves 0.4.2 under caret rules, so 0.6.0's >=3.3.0 floor is a promise it cannot keep. Anyone on an older Flutter is broken today; 0.6.1 simply stops advertising support it never had.

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 PasswordTextField — null 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
150
points
623
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