Skip to content

Commit

Permalink
fix: expose more TextField properties on PasswordBox (Fixes #925)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Sep 14, 2023
1 parent eb39580 commit c2e5022
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* fix: tap on `DatePicker` day does not skip a day ([#914](https://github.com/bdlukaa/fluent_ui/issues/914))
* fix: ensure `PaneItemExpander`'s flyout is attached before using it ([#857](https://github.com/bdlukaa/fluent_ui/issues/857))
* fix: expose more `TextField` properties on `NumberBox` ([#933](https://github.com/bdlukaa/fluent_ui/discussions/933))
* fix: expose more `TextField` properties on `PasswordBox` ([#925](https://github.com/bdlukaa/fluent_ui/issues/925))

## 4.7.3

Expand Down
31 changes: 31 additions & 0 deletions lib/src/controls/form/password_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,27 @@ class PasswordBox extends StatefulWidget {
/// {@macro flutter.material.InputDecorator.textAlignVertical}
final TextAlignVertical? textAlignVertical;

/// The style to use for the text being edited.
///
/// Also serves as a base for the [placeholder] text's style.
///
/// Defaults to the standard font style from [FluentTheme] if null.
final TextStyle? style;

/// Padding around the text entry area between the [prefix] and [suffix].
///
/// Defaults to [kTextBoxPadding]
final EdgeInsetsGeometry padding;

/// {@macro flutter.widgets.editableText.scrollPadding}
final EdgeInsets scrollPadding;

/// {@macro flutter.widgets.editableText.scrollController}
final ScrollController? scrollController;

/// {@macro flutter.widgets.editableText.scrollPhysics}
final ScrollPhysics? scrollPhysics;

/// Creates a password box
const PasswordBox({
super.key,
Expand Down Expand Up @@ -185,6 +206,11 @@ class PasswordBox extends StatefulWidget {
this.keyboardAppearance,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.style,
this.padding = kTextBoxPadding,
this.scrollController,
this.scrollPadding = const EdgeInsets.all(20.0),
this.scrollPhysics,
});

@override
Expand Down Expand Up @@ -356,6 +382,11 @@ class _PasswordBoxState extends State<PasswordBox> {
keyboardAppearance: widget.keyboardAppearance,
textAlign: widget.textAlign,
textAlignVertical: widget.textAlignVertical,
style: widget.style,
padding: widget.padding,
scrollController: widget.scrollController,
scrollPadding: widget.scrollPadding,
scrollPhysics: widget.scrollPhysics,
);
}
}
Expand Down

0 comments on commit c2e5022

Please sign in to comment.