From 4fe79442c86c6828deba949d37a68665ae75bb8c Mon Sep 17 00:00:00 2001 From: jslavitz Date: Thu, 17 Jan 2019 19:36:48 -0800 Subject: [PATCH] Reverts default DragStartBehavior to DragStartBehavior.down (#26734) --- .../flutter/lib/src/cupertino/switch.dart | 9 +-- .../flutter/lib/src/gestures/monodrag.dart | 2 +- .../flutter/lib/src/material/date_picker.dart | 9 +-- packages/flutter/lib/src/material/drawer.dart | 5 +- .../src/material/paginated_data_table.dart | 2 +- .../flutter/lib/src/material/scaffold.dart | 2 +- packages/flutter/lib/src/material/tabs.dart | 4 +- .../flutter/lib/src/material/text_field.dart | 2 +- .../flutter/lib/src/widgets/dismissible.dart | 5 +- .../lib/src/widgets/editable_text.dart | 2 +- .../lib/src/widgets/gesture_detector.dart | 5 +- .../lib/src/widgets/nested_scroll_view.dart | 4 +- .../flutter/lib/src/widgets/page_view.dart | 6 +- .../flutter/lib/src/widgets/scroll_view.dart | 16 +++--- .../flutter/lib/src/widgets/scrollable.dart | 5 +- .../src/widgets/single_child_scroll_view.dart | 2 +- .../lib/src/widgets/text_selection.dart | 7 ++- packages/flutter/test/gestures/drag_test.dart | 56 ++----------------- 18 files changed, 51 insertions(+), 92 deletions(-) diff --git a/packages/flutter/lib/src/cupertino/switch.dart b/packages/flutter/lib/src/cupertino/switch.dart index f32b2d8adab..1d2553a21fb 100644 --- a/packages/flutter/lib/src/cupertino/switch.dart +++ b/packages/flutter/lib/src/cupertino/switch.dart @@ -59,7 +59,7 @@ class CupertinoSwitch extends StatefulWidget { @required this.value, @required this.onChanged, this.activeColor, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(dragStartBehavior != null), super(key: key); @@ -96,6 +96,7 @@ class CupertinoSwitch extends StatefulWidget { /// [CupertinoTheme] in accordance to native iOS behavior. final Color activeColor; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// {@template flutter.cupertino.switch.dragStartBehavior} /// Determines the way that drag start behavior is handled. /// @@ -108,7 +109,7 @@ class CupertinoSwitch extends StatefulWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// @@ -147,7 +148,7 @@ class _CupertinoSwitchRenderObjectWidget extends LeafRenderObjectWidget { this.activeColor, this.onChanged, this.vsync, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : super(key: key); final bool value; @@ -200,7 +201,7 @@ class _RenderCupertinoSwitch extends RenderConstrainedBox { ValueChanged onChanged, @required TextDirection textDirection, @required TickerProvider vsync, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : assert(value != null), assert(activeColor != null), assert(vsync != null), diff --git a/packages/flutter/lib/src/gestures/monodrag.dart b/packages/flutter/lib/src/gestures/monodrag.dart index 4bd7dcf47c0..8f7522e82b6 100644 --- a/packages/flutter/lib/src/gestures/monodrag.dart +++ b/packages/flutter/lib/src/gestures/monodrag.dart @@ -54,7 +54,7 @@ abstract class DragGestureRecognizer extends OneSequenceGestureRecognizer { /// [dragStartBehavior] must not be null. DragGestureRecognizer({ Object debugOwner, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(dragStartBehavior != null), super(debugOwner: debugOwner); diff --git a/packages/flutter/lib/src/material/date_picker.dart b/packages/flutter/lib/src/material/date_picker.dart index cdda1eabc7b..5d12466c2c4 100644 --- a/packages/flutter/lib/src/material/date_picker.dart +++ b/packages/flutter/lib/src/material/date_picker.dart @@ -251,7 +251,7 @@ class DayPicker extends StatelessWidget { @required this.lastDate, @required this.displayedMonth, this.selectableDayPredicate, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(selectedDate != null), assert(currentDate != null), assert(onChanged != null), @@ -284,6 +284,7 @@ class DayPicker extends StatelessWidget { /// Optional user supplied predicate function to customize selectable days. final SelectableDayPredicate selectableDayPredicate; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// Determines the way that drag start behavior is handled. /// /// If set to [DragStartBehavior.start], the drag gesture used to scroll a @@ -295,7 +296,7 @@ class DayPicker extends StatelessWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// @@ -524,7 +525,7 @@ class MonthPicker extends StatefulWidget { @required this.firstDate, @required this.lastDate, this.selectableDayPredicate, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(selectedDate != null), assert(onChanged != null), assert(!firstDate.isAfter(lastDate)), @@ -787,7 +788,7 @@ class YearPicker extends StatefulWidget { @required this.onChanged, @required this.firstDate, @required this.lastDate, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(selectedDate != null), assert(onChanged != null), assert(!firstDate.isAfter(lastDate)), diff --git a/packages/flutter/lib/src/material/drawer.dart b/packages/flutter/lib/src/material/drawer.dart index 6a818e99d96..07ddff6e73b 100644 --- a/packages/flutter/lib/src/material/drawer.dart +++ b/packages/flutter/lib/src/material/drawer.dart @@ -180,7 +180,7 @@ class DrawerController extends StatefulWidget { @required this.child, @required this.alignment, this.drawerCallback, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(child != null), assert(dragStartBehavior != null), assert(alignment != null), @@ -200,6 +200,7 @@ class DrawerController extends StatefulWidget { /// Optional callback that is called when a [Drawer] is opened or closed. final DrawerCallback drawerCallback; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// {@template flutter.material.drawer.dragStartBehavior} /// Determines the way that drag start behavior is handled. /// @@ -212,7 +213,7 @@ class DrawerController extends StatefulWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// diff --git a/packages/flutter/lib/src/material/paginated_data_table.dart b/packages/flutter/lib/src/material/paginated_data_table.dart index cfd0b4c07dc..0e2ca590e36 100644 --- a/packages/flutter/lib/src/material/paginated_data_table.dart +++ b/packages/flutter/lib/src/material/paginated_data_table.dart @@ -75,7 +75,7 @@ class PaginatedDataTable extends StatefulWidget { this.rowsPerPage = defaultRowsPerPage, this.availableRowsPerPage = const [defaultRowsPerPage, defaultRowsPerPage * 2, defaultRowsPerPage * 5, defaultRowsPerPage * 10], this.onRowsPerPageChanged, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, @required this.source }) : assert(header != null), assert(columns != null), diff --git a/packages/flutter/lib/src/material/scaffold.dart b/packages/flutter/lib/src/material/scaffold.dart index 18f19c52281..7ab28c1d4af 100644 --- a/packages/flutter/lib/src/material/scaffold.dart +++ b/packages/flutter/lib/src/material/scaffold.dart @@ -796,7 +796,7 @@ class Scaffold extends StatefulWidget { this.resizeToAvoidBottomPadding, this.resizeToAvoidBottomInset, this.primary = true, - this.drawerDragStartBehavior = DragStartBehavior.start, + this.drawerDragStartBehavior = DragStartBehavior.down, }) : assert(primary != null), assert(drawerDragStartBehavior != null), super(key: key); diff --git a/packages/flutter/lib/src/material/tabs.dart b/packages/flutter/lib/src/material/tabs.dart index 381b6828486..73462bfc6dc 100644 --- a/packages/flutter/lib/src/material/tabs.dart +++ b/packages/flutter/lib/src/material/tabs.dart @@ -551,7 +551,7 @@ class TabBar extends StatefulWidget implements PreferredSizeWidget { this.labelPadding, this.unselectedLabelColor, this.unselectedLabelStyle, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, this.onTap, }) : assert(tabs != null), assert(isScrollable != null), @@ -1043,7 +1043,7 @@ class TabBarView extends StatefulWidget { @required this.children, this.controller, this.physics, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(children != null), assert(dragStartBehavior != null), super(key: key); diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index e2bf6686c2e..4474229bada 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -143,7 +143,7 @@ class TextField extends StatefulWidget { this.cursorColor, this.keyboardAppearance, this.scrollPadding = const EdgeInsets.all(20.0), - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, this.enableInteractiveSelection, this.onTap, this.buildCounter, diff --git a/packages/flutter/lib/src/widgets/dismissible.dart b/packages/flutter/lib/src/widgets/dismissible.dart index 98a94b7f451..283dce786d2 100644 --- a/packages/flutter/lib/src/widgets/dismissible.dart +++ b/packages/flutter/lib/src/widgets/dismissible.dart @@ -84,7 +84,7 @@ class Dismissible extends StatefulWidget { this.dismissThresholds = const {}, this.movementDuration = const Duration(milliseconds: 200), this.crossAxisEndOffset = 0.0, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(key != null), assert(secondaryBackground != null ? background != null : true), assert(dragStartBehavior != null), @@ -146,6 +146,7 @@ class Dismissible extends StatefulWidget { /// it is positive or negative. final double crossAxisEndOffset; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// Determines the way that drag start behavior is handled. /// /// If set to [DragStartBehavior.start], the drag gesture used to dismiss a @@ -156,7 +157,7 @@ class Dismissible extends StatefulWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index 47c98ddbdb1..6774f5e2d55 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -217,7 +217,7 @@ class EditableText extends StatefulWidget { this.cursorRadius, this.scrollPadding = const EdgeInsets.all(20.0), this.keyboardAppearance = Brightness.light, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, this.enableInteractiveSelection, }) : assert(controller != null), assert(focusNode != null), diff --git a/packages/flutter/lib/src/widgets/gesture_detector.dart b/packages/flutter/lib/src/widgets/gesture_detector.dart index 35b633cee88..be01b3f89d5 100644 --- a/packages/flutter/lib/src/widgets/gesture_detector.dart +++ b/packages/flutter/lib/src/widgets/gesture_detector.dart @@ -186,7 +186,7 @@ class GestureDetector extends StatelessWidget { this.onScaleEnd, this.behavior, this.excludeFromSemantics = false, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(excludeFromSemantics != null), assert(dragStartBehavior != null), assert(() { @@ -373,6 +373,7 @@ class GestureDetector extends StatelessWidget { /// duplication of information. final bool excludeFromSemantics; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// Determines the way that drag start behavior is handled. /// /// If set to [DragStartBehavior.start], gesture drag behavior will @@ -383,7 +384,7 @@ class GestureDetector extends StatelessWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// Only the [onStart] callbacks for the [VerticalDragGestureRecognizer], /// [HorizontalDragGestureRecognizer] and [PanGestureRecognizer] are affected diff --git a/packages/flutter/lib/src/widgets/nested_scroll_view.dart b/packages/flutter/lib/src/widgets/nested_scroll_view.dart index 4369334f788..570e1039b5b 100644 --- a/packages/flutter/lib/src/widgets/nested_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/nested_scroll_view.dart @@ -189,7 +189,7 @@ class NestedScrollView extends StatefulWidget { this.physics, @required this.headerSliverBuilder, @required this.body, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(scrollDirection != null), assert(reverse != null), assert(headerSliverBuilder != null), @@ -371,7 +371,7 @@ class _NestedScrollViewCustomScrollView extends CustomScrollView { @required ScrollController controller, @required List slivers, @required this.handle, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : super( scrollDirection: scrollDirection, reverse: reverse, diff --git a/packages/flutter/lib/src/widgets/page_view.dart b/packages/flutter/lib/src/widgets/page_view.dart index a46f22e4b74..d4509b1b0cb 100644 --- a/packages/flutter/lib/src/widgets/page_view.dart +++ b/packages/flutter/lib/src/widgets/page_view.dart @@ -424,7 +424,7 @@ class PageView extends StatefulWidget { this.pageSnapping = true, this.onPageChanged, List children = const [], - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : controller = controller ?? _defaultPageController, childrenDelegate = SliverChildListDelegate(children), super(key: key); @@ -451,7 +451,7 @@ class PageView extends StatefulWidget { this.onPageChanged, @required IndexedWidgetBuilder itemBuilder, int itemCount, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : controller = controller ?? _defaultPageController, childrenDelegate = SliverChildBuilderDelegate(itemBuilder, childCount: itemCount), super(key: key); @@ -467,7 +467,7 @@ class PageView extends StatefulWidget { this.pageSnapping = true, this.onPageChanged, @required this.childrenDelegate, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(childrenDelegate != null), controller = controller ?? _defaultPageController, super(key: key); diff --git a/packages/flutter/lib/src/widgets/scroll_view.dart b/packages/flutter/lib/src/widgets/scroll_view.dart index 7e701a5448b..3f485005d63 100644 --- a/packages/flutter/lib/src/widgets/scroll_view.dart +++ b/packages/flutter/lib/src/widgets/scroll_view.dart @@ -61,7 +61,7 @@ abstract class ScrollView extends StatelessWidget { this.shrinkWrap = false, this.cacheExtent, this.semanticChildCount, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(reverse != null), assert(shrinkWrap != null), assert(dragStartBehavior != null), @@ -404,7 +404,7 @@ class CustomScrollView extends ScrollView { double cacheExtent, this.slivers = const [], int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : super( key: key, scrollDirection: scrollDirection, @@ -448,7 +448,7 @@ abstract class BoxScrollView extends ScrollView { this.padding, double cacheExtent, int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : super( key: key, scrollDirection: scrollDirection, @@ -750,7 +750,7 @@ class ListView extends BoxScrollView { double cacheExtent, List children = const [], int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : childrenDelegate = SliverChildListDelegate( children, addAutomaticKeepAlives: addAutomaticKeepAlives, @@ -813,7 +813,7 @@ class ListView extends BoxScrollView { bool addSemanticIndexes = true, double cacheExtent, int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : childrenDelegate = SliverChildBuilderDelegate( itemBuilder, childCount: itemCount, @@ -1265,7 +1265,7 @@ class GridView extends BoxScrollView { @required this.childrenDelegate, double cacheExtent, int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : assert(gridDelegate != null), assert(childrenDelegate != null), super( @@ -1315,7 +1315,7 @@ class GridView extends BoxScrollView { double cacheExtent, List children = const [], int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : gridDelegate = SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: crossAxisCount, mainAxisSpacing: mainAxisSpacing, @@ -1373,7 +1373,7 @@ class GridView extends BoxScrollView { bool addSemanticIndexes = true, List children = const [], int semanticChildCount, - DragStartBehavior dragStartBehavior = DragStartBehavior.start, + DragStartBehavior dragStartBehavior = DragStartBehavior.down, }) : gridDelegate = SliverGridDelegateWithMaxCrossAxisExtent( maxCrossAxisExtent: maxCrossAxisExtent, mainAxisSpacing: mainAxisSpacing, diff --git a/packages/flutter/lib/src/widgets/scrollable.dart b/packages/flutter/lib/src/widgets/scrollable.dart index de3a9a0795b..4af767fbecc 100644 --- a/packages/flutter/lib/src/widgets/scrollable.dart +++ b/packages/flutter/lib/src/widgets/scrollable.dart @@ -81,7 +81,7 @@ class Scrollable extends StatefulWidget { @required this.viewportBuilder, this.excludeFromSemantics = false, this.semanticChildCount, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(axisDirection != null), assert(dragStartBehavior != null), assert(viewportBuilder != null), @@ -182,6 +182,7 @@ class Scrollable extends StatefulWidget { /// * [SemanticsConfiguration.scrollChildCount], the corresponding semantics property. final int semanticChildCount; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// {@template flutter.widgets.scrollable.dragStartBehavior} /// Determines the way that drag start behavior is handled. /// @@ -193,7 +194,7 @@ class Scrollable extends StatefulWidget { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// diff --git a/packages/flutter/lib/src/widgets/single_child_scroll_view.dart b/packages/flutter/lib/src/widgets/single_child_scroll_view.dart index dbd039928a6..321b6009e60 100644 --- a/packages/flutter/lib/src/widgets/single_child_scroll_view.dart +++ b/packages/flutter/lib/src/widgets/single_child_scroll_view.dart @@ -193,7 +193,7 @@ class SingleChildScrollView extends StatelessWidget { this.physics, this.controller, this.child, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : assert(scrollDirection != null), assert(dragStartBehavior != null), assert(!(controller != null && primary == true), diff --git a/packages/flutter/lib/src/widgets/text_selection.dart b/packages/flutter/lib/src/widgets/text_selection.dart index a6c00562537..de99d16b6f1 100644 --- a/packages/flutter/lib/src/widgets/text_selection.dart +++ b/packages/flutter/lib/src/widgets/text_selection.dart @@ -230,7 +230,7 @@ class TextSelectionOverlay { @required this.renderObject, this.selectionControls, this.selectionDelegate, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }): assert(value != null), assert(context != null), _value = value { @@ -265,6 +265,7 @@ class TextSelectionOverlay { /// text field. final TextSelectionDelegate selectionDelegate; + // TODO(jslavitz): Set the DragStartBehavior default to be start across all widgets. /// Determines the way that drag start behavior is handled. /// /// If set to [DragStartBehavior.start], handle drag behavior will @@ -275,7 +276,7 @@ class TextSelectionOverlay { /// animation smoother and setting it to [DragStartBehavior.down] will make /// drag behavior feel slightly more reactive. /// - /// By default, the drag start behavior is [DragStartBehavior.start]. + /// By default, the drag start behavior is [DragStartBehavior.down]. /// /// See also: /// @@ -467,7 +468,7 @@ class _TextSelectionHandleOverlay extends StatefulWidget { @required this.onSelectionHandleChanged, @required this.onSelectionHandleTapped, @required this.selectionControls, - this.dragStartBehavior = DragStartBehavior.start, + this.dragStartBehavior = DragStartBehavior.down, }) : super(key: key); final TextSelection selection; diff --git a/packages/flutter/test/gestures/drag_test.dart b/packages/flutter/test/gestures/drag_test.dart index 8349c0bcd7c..3568affa47f 100644 --- a/packages/flutter/test/gestures/drag_test.dart +++ b/packages/flutter/test/gestures/drag_test.dart @@ -58,7 +58,9 @@ void main() { tester.route(pointer.move(const Offset(20.0, 30.0))); // moved 10 horizontally and 20 vertically which is 22 total expect(didStartPan, isTrue); // 22 > 18 didStartPan = false; - expect(updatedScrollDelta, null); + // TODO(jslavitz): revert this testing change. + expect(updatedScrollDelta, const Offset(10.0, 20.0)); + updatedScrollDelta = null; expect(didEndPan, isFalse); expect(didTap, isFalse); @@ -164,57 +166,7 @@ void main() { drag.dispose(); }); - testGesture('Should report most recent point to onStart by default', (GestureTester tester) { - final HorizontalDragGestureRecognizer drag = HorizontalDragGestureRecognizer(); - final VerticalDragGestureRecognizer competingDrag = VerticalDragGestureRecognizer(); - - Offset positionAtOnStart; - drag.onStart = (DragStartDetails details) { - positionAtOnStart = details.globalPosition; - }; - - final TestPointer pointer = TestPointer(5); - final PointerDownEvent down = pointer.down(const Offset(10.0, 10.0)); - drag.addPointer(down); - competingDrag.addPointer(down); - tester.closeArena(5); - tester.route(down); - - tester.route(pointer.move(const Offset(30.0, 0.0))); - drag.dispose(); - competingDrag.dispose(); - - expect(positionAtOnStart, const Offset(30.0, 00.0)); - }); - - testGesture('Should report most recent point to onStart with a start configuration', (GestureTester tester) { - final HorizontalDragGestureRecognizer drag = - HorizontalDragGestureRecognizer(); - final VerticalDragGestureRecognizer competingDrag = VerticalDragGestureRecognizer(); - - Offset positionAtOnStart; - drag.onStart = (DragStartDetails details) { - positionAtOnStart = details.globalPosition; - }; - Offset updateOffset; - drag.onUpdate = (DragUpdateDetails details) { - updateOffset = details.globalPosition; - }; - - final TestPointer pointer = TestPointer(5); - final PointerDownEvent down = pointer.down(const Offset(10.0, 10.0)); - drag.addPointer(down); - competingDrag.addPointer(down); - tester.closeArena(5); - tester.route(down); - - tester.route(pointer.move(const Offset(30.0, 0.0))); - drag.dispose(); - competingDrag.dispose(); - - expect(positionAtOnStart, const Offset(30.0, 0.0)); - expect(updateOffset, null); - }); + // TODO(jslavitz): Revert these tests. testGesture('Should report initial down point to onStart with a down configuration', (GestureTester tester) { final HorizontalDragGestureRecognizer drag =