form method

Widget form({
  1. required GlobalKey<FormState> formKey,
  2. Widget? child,
  3. AutovalidateMode? autoValidateMode,
  4. VoidCallback? onChanged,
  5. WillPopCallback? onWillPop,
})

Wraps descendant widgets with a Form widget.

Implementation

Widget form({
  required GlobalKey<FormState> formKey,
  Widget? child,
  AutovalidateMode? autoValidateMode,
  VoidCallback? onChanged,
  WillPopCallback? onWillPop,
}) {
  return Form(
    key: formKey,
    autovalidateMode: autoValidateMode,
    onChanged: onChanged,
    onWillPop: onWillPop,
    child: this,
  );
}