diff --git a/packages/flutter/lib/src/widgets/form.dart b/packages/flutter/lib/src/widgets/form.dart index 4c3b120387..e0ce2b8e7e 100644 --- a/packages/flutter/lib/src/widgets/form.dart +++ b/packages/flutter/lib/src/widgets/form.dart @@ -72,6 +72,7 @@ class Form extends StatefulWidget { this.autovalidate = false, this.onWillPop, this.onChanged, + this.onSaved, }) : assert(child != null), super(key: key); @@ -118,6 +119,13 @@ class Form extends StatefulWidget { /// will rebuild. final VoidCallback onChanged; + /// Called when the form is saved (after all the form fields have been saved). + /// + /// See also: + /// + /// * [FormState.save] + final VoidCallback onSaved; + @override FormState createState() => FormState(); } @@ -172,6 +180,8 @@ class FormState extends State