Skip to content

Commit 60d0a66

Browse files
committed
Added min and max for number fields and divisions for slider
1 parent 757d874 commit 60d0a66

File tree

4 files changed

+187
-107
lines changed

4 files changed

+187
-107
lines changed

.idea/workspace.xml

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

example/lib/main.dart

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ class MyHomePage extends StatelessWidget {
4040
FormBuilderInputOption(value: "Option 3"),
4141
],
4242
),
43-
FormBuilderInput(
44-
type: FormBuilderInput.TYPE_NUMBER,
43+
FormBuilderInput.number(
4544
attribute: "age",
4645
label: "Age",
4746
require: true,
47+
min: 18,
4848
),
4949
FormBuilderInput(
5050
type: FormBuilderInput.TYPE_EMAIL,
@@ -88,6 +88,15 @@ class MyHomePage extends StatelessWidget {
8888
FormBuilderInputOption(value: "Swift"),
8989
FormBuilderInputOption(value: "Objective-C"),
9090
]),
91+
FormBuilderInput.slider(
92+
label: "Slider",
93+
attribute: "slider",
94+
min: 0.0,
95+
require: true,
96+
max: 100.0,
97+
value: 10.0,
98+
divisions: 20,
99+
),
91100
],
92101
onChanged: () {
93102
print("Form Changed");

0 commit comments

Comments
 (0)