From 5c2de165810e04466bad9218e7033817e1d70a48 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Mon, 9 Nov 2020 11:17:39 +0100 Subject: [PATCH] move gesture detector --- lib/src/message_input.dart | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index 2ba93347..ad70f148 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -657,28 +657,28 @@ class MessageInputState extends State { ), ], ), - Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(16.0), - topRight: Radius.circular(16.0), + GestureDetector( + onVerticalDragUpdate: (update) { + setState(() { + _filePickerSize -= update.delta.dy; + if (_filePickerSize < 100) { + _filePickerSize = 100.0; + } else if (_filePickerSize > 500) { + _filePickerSize = 500; + } + }); + }, + child: Container( + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(16.0), + topRight: Radius.circular(16.0), + ), ), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - onVerticalDragUpdate: (update) { - setState(() { - _filePickerSize -= update.delta.dy; - if (_filePickerSize < 100) { - _filePickerSize = 100.0; - } else if (_filePickerSize > 500) { - _filePickerSize = 500; - } - }); - }, + child: Container( + width: double.infinity, + child: Center( child: Padding( padding: const EdgeInsets.all(8.0), child: Container( @@ -691,7 +691,7 @@ class MessageInputState extends State { ), ), ), - ], + ), ), ), Expanded(