form method

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

Wraps descendant widgets with a Form widget.

Implementation

Widget form({
  required GlobalKey<FormState> formKey,
  Widget? child,
  AutovalidateMode? autoValidateMode,
  VoidCallback? onChanged,
  void Function(bool, Object?)? onPopInvokedWithResult,
}) {
  return Form(
    key: formKey,
    autovalidateMode: autoValidateMode,
    onChanged: onChanged,
    onPopInvokedWithResult: onPopInvokedWithResult,
    child: this,
  );
}