customTouchControl method
Enables or disables touch with a custom gesture detector
Implementation
Widget customTouchControl({
required bool enable,
VoidCallback? onTapWhileDisabled,
}) {
return GestureDetector(
onTap: enable ? null : onTapWhileDisabled,
child: AbsorbPointer(
absorbing: !enable,
child: this,
),
);
}