diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..eb658d4d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,19 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "stream-chat-flutter", + "request": "launch", + "type": "dart" + }, + { + "name": "example", + "cwd": "example", + "request": "launch", + "type": "dart" + } + ] +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c7281206..4778f4c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.16 + +- Do not wrap channel preview builder. Users will have to implement they're custom onTap/onLongPress implementation +- Make public autofocus field of the TextField of message_input + ## 0.2.15 - Add onLongPress on channel when using custom channel builder diff --git a/lib/src/channel_list_view.dart b/lib/src/channel_list_view.dart index d6621d51..33988b92 100644 --- a/lib/src/channel_list_view.dart +++ b/lib/src/channel_list_view.dart @@ -316,28 +316,9 @@ class _ChannelListViewState extends State builder: (context) { Widget child; if (widget.channelPreviewBuilder != null) { - child = Stack( - children: [ - widget.channelPreviewBuilder( - context, - channel, - ), - Positioned.fill( - child: Material( - color: Colors.transparent, - child: InkWell( - onTap: () { - onTap(channel, widget.channelWidget); - }, - onLongPress: widget.onChannelLongPress != null - ? () { - widget.onChannelLongPress(channel); - } - : null, - ), - ), - ), - ], + child = widget.channelPreviewBuilder( + context, + channel, ); } else { child = ChannelPreview( diff --git a/lib/src/message_input.dart b/lib/src/message_input.dart index fefb5209..6836d466 100644 --- a/lib/src/message_input.dart +++ b/lib/src/message_input.dart @@ -95,7 +95,7 @@ class MessageInput extends StatefulWidget { this.attachmentThumbnailBuilders, this.inputTextStyle, this.attachmentIconColor, - this.autofocus, + this.autofocus = false, }) : super(key: key); /// Message to edit @@ -262,7 +262,7 @@ class MessageInputState extends State { }); }, style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2, - autofocus: widget.autofocus ?? false, + autofocus: widget.autofocus, decoration: InputDecoration( hintText: 'Write a message', hintStyle: diff --git a/pubspec.yaml b/pubspec.yaml index 2fe6110b..583874c2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. -version: 0.2.15 +version: 0.2.16 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues