Merge branch 'master' into hotfix/channelPreview

This commit is contained in:
Salvatore Giordano
2020-12-07 13:07:56 +01:00
+5 -1
View File
@@ -95,6 +95,7 @@ class MessageInput extends StatefulWidget {
this.attachmentThumbnailBuilders,
this.inputTextStyle,
this.attachmentIconColor,
this.autofocus,
}) : super(key: key);
/// Message to edit
@@ -103,6 +104,9 @@ class MessageInput extends StatefulWidget {
/// Message to start with
final Message initialMessage;
/// If set true TextField will be active by default. Default is false.
final bool autofocus;
/// Function called after sending the message
final void Function(Message) onMessageSent;
@@ -258,7 +262,7 @@ class MessageInputState extends State<MessageInput> {
});
},
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
autofocus: false,
autofocus: widget.autofocus ?? false,
decoration: InputDecoration(
hintText: 'Write a message',
hintStyle: