KeyboardDismisser constructor
const
KeyboardDismisser({
- 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
KeyboardDismisser will dismiss the keyboard when performing a tapping
gesture.
Implementation
const KeyboardDismisser({
Key? key,
this.child,
this.behavior,
this.gestures = const [GestureType.onTap],
this.dragStartBehavior = DragStartBehavior.start,
this.excludeFromSemantics = false,
}) : super(key: key);