KeyboardDismisser constructor

const KeyboardDismisser({
  1. Key? key,
  2. Widget? child,
  3. HitTestBehavior? behavior,
  4. List<GestureType> gestures = const [GestureType.onTap],
  5. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  6. 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);