Skip to content

Commit 1a917b8

Browse files
committed
7.5.7 focusNode prop on ThemedNumberInput
1 parent 9c64814 commit 1a917b8

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 7.5.7
4+
- Added `focusNode` prop to `ThemedNumberInput` to allow external focus node management.
5+
36
## 7.5.6
47
- Add `onLongPress` with `customLongPressDuration` in `ThemedButton`
58

lib/src/inputs/src/general/number_input.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class ThemedNumberInput extends StatefulWidget {
8181
/// [hidePrefixSuffixActions] is the state of the input to hide the prefix and suffix actions. on the input
8282
final bool hidePrefixSuffixActions;
8383

84+
/// [focusNode] is the focus node of the input.
85+
final FocusNode? focusNode;
86+
8487
/// [ThemedNumberInput] is the constructor of the input.
8588
/// Simplifies (I hope so) the creation of an input using the standard format of Layrz.
8689
const ThemedNumberInput({
@@ -110,6 +113,7 @@ class ThemedNumberInput extends StatefulWidget {
110113
this.suffixText,
111114
this.prefixText,
112115
this.hidePrefixSuffixActions = false,
116+
this.focusNode,
113117
}) : assert(
114118
(label == null && labelText != null) || (label != null && labelText == null),
115119
'You must provide either a labelText or a label, but not both.',
@@ -250,6 +254,7 @@ class _ThemedNumberInputState extends State<ThemedNumberInput> {
250254
widget.onChanged?.call(castedValue);
251255
},
252256
onSubmitted: widget.onSubmitted,
257+
focusNode: widget.focusNode,
253258
);
254259
}
255260
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: layrz_theme
22
description: Layrz standard styling library for Flutter. Widget library following the Material Design 3 guidelines, with a focus on reliavility and functionality.
3-
version: "7.5.6"
3+
version: "7.5.7"
44
homepage: https://theme.layrz.com
55
repository: https://github.com/goldenm-software/layrz_theme
66

0 commit comments

Comments
 (0)