We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fc73b3 commit 490679bCopy full SHA for 490679b
example/lib/sources/complete_form.dart
@@ -89,6 +89,20 @@ class _CompleteFormState extends State<CompleteForm> {
89
validator: FormBuilderValidators.compose([
90
FormBuilderValidators.min(6),
91
]),
92
+ errorBuilder: (context, errorText) => TextButton(
93
+ onPressed: () {
94
+ ScaffoldMessenger.of(context).showSnackBar(
95
+ SnackBar(
96
+ content: Text(errorText),
97
+ duration: const Duration(seconds: 2),
98
+ ),
99
+ );
100
+ },
101
+ child: Text(
102
+ errorText,
103
+ style: const TextStyle(color: Colors.red),
104
105
106
onChanged: _onChanged,
107
min: 0.0,
108
max: 10.0,
0 commit comments