Skip to content

Commit ee94c78

Browse files
committed
Merge branch 'master' into input_chips
# Conflicts: # .idea/workspace.xml
2 parents 8901869 + c55c0c3 commit ee94c78

File tree

6 files changed

+273
-319
lines changed

6 files changed

+273
-319
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,12 @@
4040
* Removed default constructor for `FormBuilderInput`
4141

4242
## [1.0.1] - 3-Nov-2018
43-
* Minor improvements to documentation, added known issues section too
43+
* Minor improvements to documentation, added known issues section too
44+
45+
## [1.0.2] - 7-Nov-2018
46+
* Fixed bug in (un)selecting checkbox list using by clicking its label
47+
48+
## [1.1.0] - 19-Nov-2018
49+
* Fixed bug where validation not working for fields outside screen (when using ListView) - [Flutter Issue #17385](https://github.com/flutter/flutter/issues/17385)
50+
* Added InputDecoration for all custom FormFields
51+

example/lib/main.dart

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class MyHomePage extends StatelessWidget {
2727
margin: EdgeInsets.all(15.0),
2828
child: FormBuilder(
2929
context,
30-
autovalidate: true,
30+
// autovalidate: true,
3131
// showResetButton: true,
3232
// resetButtonContent: Text("Clear Form"),
3333
controls: [
@@ -71,6 +71,7 @@ class MyHomePage extends StatelessWidget {
7171
type: FormBuilderInput.TYPE_PHONE,
7272
attribute: "phone",
7373
label: "Phone",
74+
hint: "Including country code (+254)"
7475
//require: true,
7576
),
7677
FormBuilderInput.password(
@@ -87,7 +88,8 @@ class MyHomePage extends StatelessWidget {
8788
attribute: "time",
8889
),
8990
FormBuilderInput.checkboxList(
90-
label: "My Languages",
91+
label: "The Languages of my people",
92+
hint: "The Languages of my people",
9193
attribute: "languages",
9294
require: false,
9395
value: ["Dart"],
@@ -120,6 +122,15 @@ class MyHomePage extends StatelessWidget {
120122
return "Accept terms to continue";
121123
}
122124
),
125+
FormBuilderInput.switchInput(
126+
label: "I accept the terms and conditions",
127+
attribute: "accept_terms_switch",
128+
hint: "Kindly make sure you've read all the terms and conditions",
129+
validator: (value){
130+
if(!value)
131+
return "Accept terms to continue";
132+
}
133+
),
123134
FormBuilderInput.slider(
124135
label: "Slider",
125136
attribute: "slider",
@@ -140,7 +151,7 @@ class MyHomePage extends StatelessWidget {
140151
FormBuilderInput.rate(
141152
label: "Rate",
142153
attribute: "rate",
143-
iconSize: 48.0,
154+
iconSize: 32.0,
144155
value: 1,
145156
max: 5,
146157
hint: "Hint",

0 commit comments

Comments
 (0)