Skip to content

Commit 23524f7

Browse files
committed
Text Field Miscellaneous Updates
- Implement initial value property which is a variable prop too. - Implement variable syncing for text field value. - Implement variable selection dropdown.
1 parent 751b9b6 commit 23524f7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/src/api/nodes/text_field_node.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ class TextFieldNode extends SceneNode with CustomPropertiesMixin {
2323
/// Holds configurable properties of the text field.
2424
TextFieldProperties properties;
2525

26+
/// Initial text value of the field.
27+
String initialText = '';
28+
2629
/// Creates a text field from the given properties.
2730
TextFieldNode.fromProperties(this.properties)
2831
: super(
@@ -77,6 +80,7 @@ class TextFieldNode extends SceneNode with CustomPropertiesMixin {
7780
super.parentID,
7881
super.positioningMode,
7982
required this.properties,
83+
this.initialText = '',
8084
});
8185

8286
@override
@@ -175,6 +179,7 @@ class TextFieldProperties with SerializableMixin, EquatableMixin {
175179
/// Maximum lines of text that appear at a time.
176180
late int? minLines;
177181

182+
/// Whether the field expands to fill the available space vertically.
178183
late bool expands;
179184

180185
/// Defines the character that is used to obscure the text in the field.

lib/src/api/nodes/text_field_node.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)