From 45d561901e2f40d70b7c3424c8e2b756a8d30dcb Mon Sep 17 00:00:00 2001 From: Ali Haider Date: Mon, 29 May 2023 14:22:10 +0500 Subject: [PATCH] Null safety added on TextSelectionGestureDetector --- .../widgets/selection/gesture_detector_builder.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/widgets/selection/gesture_detector_builder.dart b/lib/src/widgets/selection/gesture_detector_builder.dart index f44d1c3a..6101f20f 100644 --- a/lib/src/widgets/selection/gesture_detector_builder.dart +++ b/lib/src/widgets/selection/gesture_detector_builder.dart @@ -182,19 +182,19 @@ class MathSelectionGestureDetectorBuilder { }) => TextSelectionGestureDetector( key: key, - onTapDown: onTapDown, + onTapDown: (value) => onTapDown ?? () {}, onForcePressStart: delegate.forcePressEnabled ? onForcePressStart : null, onForcePressEnd: delegate.forcePressEnabled ? onForcePressEnd : null, - onSingleTapUp: onSingleTapUp, + onSingleTapUp: (value) => onSingleTapUp ?? () {}, onSingleTapCancel: onSingleTapCancel, onSingleLongTapStart: onSingleLongTapStart, onSingleLongTapMoveUpdate: onSingleLongTapMoveUpdate, onSingleLongTapEnd: onSingleLongTapEnd, - onDoubleTapDown: onDoubleTapDown, - onDragSelectionStart: onDragSelectionStart, - onDragSelectionUpdate: onDragSelectionUpdate, - onDragSelectionEnd: onDragSelectionEnd, + onDoubleTapDown: (value) => onDoubleTapDown ?? () {}, + onDragSelectionStart: (value) => onDragSelectionStart ?? () {}, + onDragSelectionUpdate: (value) => onDragSelectionUpdate ?? () {}, + onDragSelectionEnd: (value) => onDragSelectionEnd ?? () {}, behavior: behavior, child: child, );