mirror of
https://github.com/Iconica-Development/flutter_chat.git
synced 2025-05-19 02:43:50 +02:00
fix: getting users
This commit is contained in:
parent
8d2dd8b90f
commit
1424cef79c
1 changed files with 11 additions and 10 deletions
|
@ -62,7 +62,8 @@ class _UserListState extends State<UserList> {
|
|||
Widget build(BuildContext context) {
|
||||
var theme = Theme.of(context);
|
||||
var translations = widget.options.translations;
|
||||
filteredUsers = users
|
||||
filteredUsers = widget.query.isNotEmpty
|
||||
? users
|
||||
.where(
|
||||
(user) =>
|
||||
user.fullname?.toLowerCase().contains(
|
||||
|
@ -70,7 +71,8 @@ class _UserListState extends State<UserList> {
|
|||
) ??
|
||||
false,
|
||||
)
|
||||
.toList();
|
||||
.toList()
|
||||
: users;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(top: 8, left: 12, right: 12, bottom: 80),
|
||||
child: ListView.builder(
|
||||
|
@ -78,7 +80,6 @@ class _UserListState extends State<UserList> {
|
|||
itemBuilder: (context, index) {
|
||||
var user = filteredUsers[index];
|
||||
var isSelected = widget.selectedUsers.any((u) => u.id == user.id);
|
||||
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (widget.creatingGroup) {
|
||||
|
|
Loading…
Reference in a new issue