onTapUpOutside property

TapRegionUpCallback? onTapUpOutside
finalinherited

Called for each tap up that occurs outside of the TextFieldTapRegion group when the text field is focused.

This is useful if you want to un-focus the Pinput when user taps outside of it, but not when user scrolls outside of it :

onTapOutside: (event) => tapPosition = event.position,
onTapUpOutside: (event) {
  if (event.position == tapPosition) _focusNode.unfocus();
  tapPosition = null;
},

See also: EditableText.onTapUpOutside.

Implementation

final TapRegionUpCallback? onTapUpOutside;