mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 23:12:37 +01:00
fix: Inputbar focus
This commit is contained in:
parent
64851cf91d
commit
5e673c6d3d
@ -16,6 +16,7 @@ class InputBar extends StatelessWidget {
|
|||||||
final TextEditingController controller;
|
final TextEditingController controller;
|
||||||
final InputDecoration decoration;
|
final InputDecoration decoration;
|
||||||
final ValueChanged<String> onChanged;
|
final ValueChanged<String> onChanged;
|
||||||
|
final bool autofocus;
|
||||||
|
|
||||||
InputBar({
|
InputBar({
|
||||||
this.room,
|
this.room,
|
||||||
@ -27,6 +28,7 @@ class InputBar extends StatelessWidget {
|
|||||||
this.controller,
|
this.controller,
|
||||||
this.decoration,
|
this.decoration,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
|
this.autofocus,
|
||||||
});
|
});
|
||||||
|
|
||||||
List<Map<String, String>> getSuggestions(String text) {
|
List<Map<String, String>> getSuggestions(String text) {
|
||||||
@ -265,6 +267,7 @@ class InputBar extends StatelessWidget {
|
|||||||
minLines: minLines,
|
minLines: minLines,
|
||||||
maxLines: maxLines,
|
maxLines: maxLines,
|
||||||
keyboardType: keyboardType,
|
keyboardType: keyboardType,
|
||||||
|
autofocus: autofocus,
|
||||||
onSubmitted: (text) {
|
onSubmitted: (text) {
|
||||||
// fix for library for now
|
// fix for library for now
|
||||||
onSubmitted(text);
|
onSubmitted(text);
|
||||||
|
@ -961,7 +961,8 @@ class _ChatState extends State<_Chat> {
|
|||||||
room: room,
|
room: room,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
maxLines: kIsWeb ? 1 : 8,
|
maxLines: kIsWeb ? 1 : 8,
|
||||||
keyboardType: kIsWeb
|
autofocus: !PlatformInfos.isMobile,
|
||||||
|
keyboardType: !PlatformInfos.isMobile
|
||||||
? TextInputType.text
|
? TextInputType.text
|
||||||
: TextInputType.multiline,
|
: TextInputType.multiline,
|
||||||
onSubmitted: (String text) {
|
onSubmitted: (String text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user