feat(ui): add customOverlays to MessageInput
This commit is contained in:
@@ -5,11 +5,16 @@
|
|||||||
- [[#668]](https://github.com/GetStream/stream-chat-flutter/issues/668): Fix `MessageInput` rendering errors in case
|
- [[#668]](https://github.com/GetStream/stream-chat-flutter/issues/668): Fix `MessageInput` rendering errors in case
|
||||||
there are no actions available to show.
|
there are no actions available to show.
|
||||||
- [[#349]](https://github.com/GetStream/stream-chat-flutter/issues/349): Fix `MessageInput` attachment render overflow error.
|
- [[#349]](https://github.com/GetStream/stream-chat-flutter/issues/349): Fix `MessageInput` attachment render overflow error.
|
||||||
|
- `MessageInput` overlays now follow the `MessageInput` focus.
|
||||||
|
|
||||||
🔄 Changed
|
🔄 Changed
|
||||||
|
|
||||||
- Animation curves changed from default `Curves.linear` to `Curves.easeOut` and `Curves.easeIn` for attachment controls.
|
- Animation curves changed from default `Curves.linear` to `Curves.easeOut` and `Curves.easeIn` for attachment controls.
|
||||||
|
|
||||||
|
✅ Added
|
||||||
|
|
||||||
|
- Added `MessageInput.customOverlays` property to add custom overlays to the `MessageInput`.
|
||||||
|
|
||||||
## 2.2.1
|
## 2.2.1
|
||||||
|
|
||||||
⚠️ Deprecated
|
⚠️ Deprecated
|
||||||
@@ -109,7 +114,6 @@ upgraded with some goodies like `lerp` functions. Here's the full naming breakdo
|
|||||||
- Fixed `MessageListView` not opening to the right initialMessage if `StreamChannel.initialMessageId` is set.
|
- Fixed `MessageListView` not opening to the right initialMessage if `StreamChannel.initialMessageId` is set.
|
||||||
- Fixed null check errors when accessing `message.text` in `MessageWidget` and `MessageListView`; this occurred when
|
- Fixed null check errors when accessing `message.text` in `MessageWidget` and `MessageListView`; this occurred when
|
||||||
sending a message with no text.
|
sending a message with no text.
|
||||||
- MessageInput can now be placed in any position on the screen.
|
|
||||||
|
|
||||||
## 2.1.2
|
## 2.1.2
|
||||||
|
|
||||||
|
|||||||
@@ -192,6 +192,7 @@ class MessageInput extends StatefulWidget {
|
|||||||
this.onAttachmentLimitExceed,
|
this.onAttachmentLimitExceed,
|
||||||
this.attachmentButtonBuilder,
|
this.attachmentButtonBuilder,
|
||||||
this.commandButtonBuilder,
|
this.commandButtonBuilder,
|
||||||
|
this.customOverlays = const [],
|
||||||
}) : assert(
|
}) : assert(
|
||||||
initialMessage == null || editMessage == null,
|
initialMessage == null || editMessage == null,
|
||||||
"Can't provide both `initialMessage` and `editMessage`",
|
"Can't provide both `initialMessage` and `editMessage`",
|
||||||
@@ -222,6 +223,9 @@ class MessageInput extends StatefulWidget {
|
|||||||
/// Use this to transform the message
|
/// Use this to transform the message
|
||||||
final FutureOr<Message> Function(Message)? preMessageSending;
|
final FutureOr<Message> Function(Message)? preMessageSending;
|
||||||
|
|
||||||
|
/// List of custom overlays
|
||||||
|
final List<OverlayOption> customOverlays;
|
||||||
|
|
||||||
/// Parent message in case of a thread
|
/// Parent message in case of a thread
|
||||||
final Message? parentMessage;
|
final Message? parentMessage;
|
||||||
|
|
||||||
@@ -324,7 +328,6 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
bool _inputEnabled = true;
|
bool _inputEnabled = true;
|
||||||
bool _commandEnabled = false;
|
bool _commandEnabled = false;
|
||||||
bool _showCommandsOverlay = false;
|
bool _showCommandsOverlay = false;
|
||||||
bool _showEmojiOverlay = false;
|
|
||||||
bool _showMentionsOverlay = false;
|
bool _showMentionsOverlay = false;
|
||||||
|
|
||||||
Command? _chosenCommand;
|
Command? _chosenCommand;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
export 'package:jiffy/jiffy.dart';
|
export 'package:jiffy/jiffy.dart';
|
||||||
export 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
export 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||||
|
|
||||||
|
export 'src/anchored_overlay.dart';
|
||||||
export 'src/attachment/attachment.dart';
|
export 'src/attachment/attachment.dart';
|
||||||
export 'src/back_button.dart';
|
export 'src/back_button.dart';
|
||||||
export 'src/channel_avatar.dart';
|
export 'src/channel_avatar.dart';
|
||||||
|
|||||||
Reference in New Issue
Block a user