KeyboardDismiss constructor
const
KeyboardDismiss({
- Key? key,
- Widget? child,
- HitTestBehavior? behavior,
- List<
GestureType> gestures = const [GestureType.onTap], - DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- bool excludeFromSemantics = false,
Creates a widget that can dismiss the keyboard when performing a gesture.
The gestures
property holds a list of GestureType that will dismiss
the keyboard when performed. This way, several gestures are supported.
Pan and scale callbacks cannot be used simultaneously, and horizontal and
vertical drag callbacks cannot be used simultaneously. By default, the
KeyboardDismiss will dismiss the keyboard when performing a tapping
gesture.
Implementation
const KeyboardDismiss({
super.key,
this.child,
this.behavior,
this.gestures = const [GestureType.onTap],
this.dragStartBehavior = DragStartBehavior.start,
this.excludeFromSemantics = false,
});