feat(ui): add customOverlays to MessageInput

This commit is contained in:
Salvatore Giordano
2021-09-20 12:07:08 +02:00
parent bba1e817d3
commit a4efbbaa9f
3 changed files with 10 additions and 2 deletions
@@ -192,6 +192,7 @@ class MessageInput extends StatefulWidget {
this.onAttachmentLimitExceed,
this.attachmentButtonBuilder,
this.commandButtonBuilder,
this.customOverlays = const [],
}) : assert(
initialMessage == null || editMessage == null,
"Can't provide both `initialMessage` and `editMessage`",
@@ -222,6 +223,9 @@ class MessageInput extends StatefulWidget {
/// Use this to transform the message
final FutureOr<Message> Function(Message)? preMessageSending;
/// List of custom overlays
final List<OverlayOption> customOverlays;
/// Parent message in case of a thread
final Message? parentMessage;
@@ -324,7 +328,6 @@ class MessageInputState extends State<MessageInput> {
bool _inputEnabled = true;
bool _commandEnabled = false;
bool _showCommandsOverlay = false;
bool _showEmojiOverlay = false;
bool _showMentionsOverlay = false;
Command? _chosenCommand;