Form constructor
- Key? key,
- required Widget child,
- bool? canPop,
- @Deprecated('Use onPopInvokedWithResult instead. ' 'This feature was deprecated after v3.22.0-12.0.pre.') PopInvokedCallback? onPopInvoked,
- PopInvokedWithResultCallback<
Object?> ? onPopInvokedWithResult, - @Deprecated('Use canPop and/or onPopInvokedWithResult instead. ' 'This feature was deprecated after v3.12.0-1.0.pre.') WillPopCallback? onWillPop,
- VoidCallback? onChanged,
- AutovalidateMode? autovalidateMode,
Creates a container for form fields.
Implementation
const Form({
super.key,
required this.child,
this.canPop,
@Deprecated(
'Use onPopInvokedWithResult instead. '
'This feature was deprecated after v3.22.0-12.0.pre.',
)
this.onPopInvoked,
this.onPopInvokedWithResult,
@Deprecated(
'Use canPop and/or onPopInvokedWithResult instead. '
'This feature was deprecated after v3.12.0-1.0.pre.',
)
this.onWillPop,
this.onChanged,
AutovalidateMode? autovalidateMode,
}) : autovalidateMode = autovalidateMode ?? AutovalidateMode.disabled,
assert(onPopInvokedWithResult == null || onPopInvoked == null, 'onPopInvoked is deprecated; use onPopInvokedWithResult'),
assert(((onPopInvokedWithResult ?? onPopInvoked ?? canPop) == null) || onWillPop == null, 'onWillPop is deprecated; use canPop and/or onPopInvokedWithResult.');