Skip to content

Commit 7b0018f

Browse files
authored
Merge pull request #641 from awhitford/checkbox-example
Revised the FormBuilderCheckbox example
2 parents 60a7721 + 1d42f3f commit 7b0018f

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,21 +196,16 @@ Widget build(BuildContext context) {
196196
TextSpan(
197197
text: 'Terms and Conditions',
198198
style: TextStyle(color: Colors.blue),
199-
recognizer: TapGestureRecognizer()
200-
..onTap = () {
201-
print('launch url');
202-
},
203199
),
204200
],
205201
),
206202
),
207-
validator: FormBuilderValidators.compose([
208-
FormBuilderValidators.requireTrue(
209-
context,
210-
errorText:
211-
'You must accept terms and conditions to continue',
212-
),
213-
]),
203+
validator: FormBuilderValidators.equal(
204+
context,
205+
true,
206+
errorText:
207+
'You must accept terms and conditions to continue',
208+
),
214209
),
215210
FormBuilderTextField(
216211
name: 'age',

example/lib/sources/complete_form.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,14 +233,12 @@ class CompleteFormState extends State<CompleteForm> {
233233
],
234234
),
235235
),
236-
validator: FormBuilderValidators.compose([
237-
FormBuilderValidators.equal(
238-
context,
239-
true,
240-
errorText:
241-
'You must accept terms and conditions to continue',
242-
),
243-
]),
236+
validator: FormBuilderValidators.equal(
237+
context,
238+
true,
239+
errorText:
240+
'You must accept terms and conditions to continue',
241+
),
244242
),
245243
FormBuilderTextField(
246244
autovalidateMode: AutovalidateMode.always,

0 commit comments

Comments
 (0)