Hide keyboard on scrolling user list

This commit is contained in:
xsahil03x
2020-11-25 15:41:06 +05:30
parent 3cda66a255
commit 177d50a511
3 changed files with 178 additions and 166 deletions
@@ -164,6 +164,9 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
),
),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onPanDown: (_) => FocusScope.of(context).unfocus(),
child: ListView.separated(
itemCount: _selectedUsers.length + 1,
separatorBuilder: (_, __) => Container(
@@ -219,6 +222,7 @@ class _GroupChatDetailsScreenState extends State<GroupChatDetailsScreen> {
},
),
),
),
],
),
),
+5 -1
View File
@@ -243,7 +243,10 @@ class _NewChatScreenState extends State<NewChatScreen> {
),
Expanded(
child: _showUserList
? UsersBloc(
? GestureDetector(
behavior: HitTestBehavior.opaque,
onPanDown: (_) => FocusScope.of(context).unfocus(),
child: UsersBloc(
child: UserListView(
selectedUsers: _selectedUsers,
groupAlphabetically: _isSearchActive ? false : true,
@@ -305,6 +308,7 @@ class _NewChatScreenState extends State<NewChatScreen> {
);
},
),
),
)
: MessageListView(),
),
+5 -1
View File
@@ -238,7 +238,10 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
),
];
},
body: UsersBloc(
body: GestureDetector(
behavior: HitTestBehavior.opaque,
onPanDown: (_) => FocusScope.of(context).unfocus(),
child: UsersBloc(
child: UserListView(
selectedUsers: _selectedUsers,
pullToRefresh: false,
@@ -304,6 +307,7 @@ class _NewGroupChatScreenState extends State<NewGroupChatScreen> {
),
),
),
),
);
}
}