Skip to content

Commit 99504b8

Browse files
authored
FormBuilderCheckbox Example Fix (#555)
* Fix: Removed TapGestureRecognizer from CheckboxListTile child because Flutter does not allow a button inside a button. See flutter/flutter#31437 (comment)
1 parent 0872c7e commit 99504b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

example/lib/sources/complete_form.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:flutter/cupertino.dart';
2-
import 'package:flutter/gestures.dart';
2+
//import 'package:flutter/gestures.dart';
33
import 'package:flutter/material.dart';
44
import 'package:flutter_form_builder/flutter_form_builder.dart';
55
import 'package:intl/intl.dart';
@@ -227,10 +227,14 @@ class CompleteFormState extends State<CompleteForm> {
227227
TextSpan(
228228
text: 'Terms and Conditions',
229229
style: TextStyle(color: Colors.blue),
230+
// Flutter doesn't allow a button inside a button
231+
// https://github.com/flutter/flutter/issues/31437#issuecomment-492411086
232+
/*
230233
recognizer: TapGestureRecognizer()
231234
..onTap = () {
232235
print('launch url');
233236
},
237+
*/
234238
),
235239
],
236240
),

0 commit comments

Comments
 (0)