diff --git a/app/CHANGELOG.md b/app/CHANGELOG.md index edb70a50..c415cdfe 100644 --- a/app/CHANGELOG.md +++ b/app/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Bug]: Icons Button name ([#334](https://github.com/Orange-OpenSource/ods-flutter/issues/334)) - [Bug]: Spacing for the 'Small Card' component ([#342](https://github.com/Orange-OpenSource/ods-flutter/issues/342)) - [Bug]: Snackbar without action text positioning ([#198](https://github.com/Orange-OpenSource/ods-flutter/issues/198)) +- [Bug]: SheetBottom. Tap to scroll down ([#341](https://github.com/Orange-OpenSource/ods-flutter/issues/341)) ### [0.8.O](https://github.com/Orange-OpenSource/ods-flutter/compare/0.1.1...0.8.0) - 2023-03-02 diff --git a/library/CHANGELOG.md b/library/CHANGELOG.md index 786e1679..5b8f0afa 100644 --- a/library/CHANGELOG.md +++ b/library/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Bug]: Spacing for the 'Small Card' component ([#342](https://github.com/Orange-OpenSource/ods-flutter/issues/342)) - [Bug]: Snackbar without action text positioning ([#198](https://github.com/Orange-OpenSource/ods-flutter/issues/198)) +- [Bug]: SheetBottom. Tap to scroll down ([#341](https://github.com/Orange-OpenSource/ods-flutter/issues/341)) ## [0.8.O](https://github.com/Orange-OpenSource/ods-flutter/compare/0.1.1...0.8.0) - 2023-03-02 diff --git a/library/lib/components/sheets_bottom/ods_sheets_bottom.dart b/library/lib/components/sheets_bottom/ods_sheets_bottom.dart index 81248f6e..ae7e3dcc 100644 --- a/library/lib/components/sheets_bottom/ods_sheets_bottom.dart +++ b/library/lib/components/sheets_bottom/ods_sheets_bottom.dart @@ -64,83 +64,88 @@ class _OdsSheetsBottomState extends State { child: AnimatedContainer( duration: const Duration(seconds: 11150), height: expanded ? collapsedHeight : null, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - GestureDetector( - onPanEnd: (details) { - if (details.velocity.pixelsPerSecond.dy.abs() > 100 && - details.velocity.pixelsPerSecond.dy != 0.0) { - _expandCloseBottomSheet(); - } - }, - child: Container( - color: Colors.transparent, - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only(top: spacingM), - child: Container( - width: 40, - height: 5, - margin: const EdgeInsets.symmetric(vertical: spacingXs), - decoration: BoxDecoration( - color: - Theme.of(context).colorScheme.secondaryContainer, - borderRadius: BorderRadius.circular(2.5), - ), - ), - ), - ], - ), - ), - ), - GestureDetector( - onPanEnd: (details) { - if (details.velocity.pixelsPerSecond.dy.abs() > 100 && - details.velocity.pixelsPerSecond.dy != 0.0) { - _expandCloseBottomSheet(); - } - }, - child: MergeSemantics( + child: GestureDetector( + onTap: _expandCloseBottomSheet, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + GestureDetector( + onPanEnd: (details) { + if (details.velocity.pixelsPerSecond.dy.abs() > 100 && + details.velocity.pixelsPerSecond.dy != 0.0) { + _expandCloseBottomSheet(); + } + }, child: Container( color: Colors.transparent, child: Row( + mainAxisAlignment: MainAxisAlignment.center, children: [ - AnimatedRotation( - turns: chevronTurns, - duration: const Duration(milliseconds: 200), - child: IconButton( - icon: const Icon( - Icons.expand_more, - size: 31, + Padding( + padding: const EdgeInsets.only(top: spacingM), + child: Container( + width: 40, + height: 5, + margin: + const EdgeInsets.symmetric(vertical: spacingXs), + decoration: BoxDecoration( + color: Theme.of(context) + .colorScheme + .secondaryContainer, + borderRadius: BorderRadius.circular(2.5), ), - onPressed: _expandCloseBottomSheet, - ), - ), - Expanded( - child: Text( - widget.title, - style: Theme.of(context).textTheme.titleMedium, - overflow: TextOverflow.ellipsis, ), ), ], ), ), ), - ), - if (!expanded) - Flexible( - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.only(bottom: spacingXl), - child: widget.sheetContent, + GestureDetector( + onPanEnd: (details) { + if (details.velocity.pixelsPerSecond.dy.abs() > 100 && + details.velocity.pixelsPerSecond.dy != 0.0) { + _expandCloseBottomSheet(); + } + }, + child: MergeSemantics( + child: Container( + color: Colors.transparent, + child: Row( + children: [ + AnimatedRotation( + turns: chevronTurns, + duration: const Duration(milliseconds: 200), + child: IconButton( + icon: const Icon( + Icons.expand_more, + size: 31, + ), + onPressed: _expandCloseBottomSheet, + ), + ), + Expanded( + child: Text( + widget.title, + style: Theme.of(context).textTheme.titleMedium, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), ), ), - ) - ], + ), + if (!expanded) + Flexible( + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.only(bottom: spacingXl), + child: widget.sheetContent, + ), + ), + ) + ], + ), ), ), );