fix messageinput autofocus

This commit is contained in:
Salvatore Giordano
2020-12-07 13:08:11 +01:00
parent 7a3218c9df
commit b5b35031d9
2 changed files with 21 additions and 2 deletions
+19
View File
@@ -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"
}
]
}
+2 -2
View File
@@ -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<MessageInput> {
});
},
style: widget.inputTextStyle ?? Theme.of(context).textTheme.bodyText2,
autofocus: widget.autofocus ?? false,
autofocus: widget.autofocus,
decoration: InputDecoration(
hintText: 'Write a message',
hintStyle: