From a167610e171326efdee9f2ebd55347282368f789 Mon Sep 17 00:00:00 2001 From: Tonic Artos Date: Wed, 8 Jul 2020 08:54:03 +0800 Subject: [PATCH] Remove superfluous GestureDetector. (#60730) --- packages/flutter/lib/src/material/about.dart | 56 +++++++++----------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/packages/flutter/lib/src/material/about.dart b/packages/flutter/lib/src/material/about.dart index adbd98994a..63337e6be4 100644 --- a/packages/flutter/lib/src/material/about.dart +++ b/packages/flutter/lib/src/material/about.dart @@ -1632,38 +1632,32 @@ class _DetailView extends StatelessWidget { final double screenHeight = MediaQuery.of(context).size.height; final double minHeight = (screenHeight - kToolbarHeight) / screenHeight; - return GestureDetector( - onTap: () { - print('draggable'); - }, - behavior: HitTestBehavior.deferToChild, - child: DraggableScrollableSheet( - initialChildSize: minHeight, - minChildSize: minHeight, - maxChildSize: 1, - expand: false, - builder: (BuildContext context, ScrollController controller) { - return MouseRegion( - // TODO(TonicArtos): Remove MouseRegion workaround for pointer hover events passing through DraggableScrollableSheet once https://github.com/flutter/flutter/issues/59741 is resolved. - child: Card( - color: Theme.of(context).cardColor, - elevation: _kCardElevation, - clipBehavior: Clip.antiAlias, - margin: const EdgeInsets.fromLTRB( - _kCardElevation, 0.0, _kCardElevation, 0.0), - shape: const RoundedRectangleBorder( - borderRadius: BorderRadius.vertical( - top: Radius.circular(3.0), bottom: Radius.zero), - ), - child: _builder( - context, - _arguments, - controller, - ), + return DraggableScrollableSheet( + initialChildSize: minHeight, + minChildSize: minHeight, + maxChildSize: 1, + expand: false, + builder: (BuildContext context, ScrollController controller) { + return MouseRegion( + // TODO(TonicArtos): Remove MouseRegion workaround for pointer hover events passing through DraggableScrollableSheet once https://github.com/flutter/flutter/issues/59741 is resolved. + child: Card( + color: Theme.of(context).cardColor, + elevation: _kCardElevation, + clipBehavior: Clip.antiAlias, + margin: const EdgeInsets.fromLTRB( + _kCardElevation, 0.0, _kCardElevation, 0.0), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(3.0), bottom: Radius.zero), ), - ); - }, - ), + child: _builder( + context, + _arguments, + controller, + ), + ), + ); + }, ); } }