update lists
This commit is contained in:
@@ -308,77 +308,74 @@ class _NewChatScreenState extends State<NewChatScreen> {
|
|||||||
? GestureDetector(
|
? GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
onPanDown: (_) => FocusScope.of(context).unfocus(),
|
||||||
child: UsersBloc(
|
child: StreamUserListView(
|
||||||
child: StreamUserListView(
|
controller: userListController,
|
||||||
controller: userListController,
|
// groupAlphabetically:
|
||||||
// groupAlphabetically:
|
// _isSearchActive ? false : true,
|
||||||
// _isSearchActive ? false : true,
|
onUserTap: (user) {
|
||||||
onUserTap: (user) {
|
_controller.clear();
|
||||||
_controller.clear();
|
if (!_selectedUsers.contains(user)) {
|
||||||
if (!_selectedUsers.contains(user)) {
|
_chipInputTextFieldState
|
||||||
_chipInputTextFieldState
|
?..addItem(user)
|
||||||
?..addItem(user)
|
..pauseItemAddition();
|
||||||
..pauseItemAddition();
|
} else {
|
||||||
} else {
|
_chipInputTextFieldState!.removeItem(user);
|
||||||
_chipInputTextFieldState!.removeItem(user);
|
}
|
||||||
}
|
},
|
||||||
},
|
itemBuilder: (
|
||||||
itemBuilder: (
|
context,
|
||||||
context,
|
users,
|
||||||
users,
|
index,
|
||||||
index,
|
defaultWidget,
|
||||||
defaultWidget,
|
) {
|
||||||
) {
|
return defaultWidget.copyWith(
|
||||||
return defaultWidget.copyWith(
|
selected:
|
||||||
selected:
|
_selectedUsers.contains(users[index]),
|
||||||
_selectedUsers.contains(users[index]),
|
);
|
||||||
);
|
},
|
||||||
},
|
emptyBuilder: (_) {
|
||||||
emptyBuilder: (_) {
|
return LayoutBuilder(
|
||||||
return LayoutBuilder(
|
builder: (context, viewportConstraints) {
|
||||||
builder: (context, viewportConstraints) {
|
return SingleChildScrollView(
|
||||||
return SingleChildScrollView(
|
physics: AlwaysScrollableScrollPhysics(),
|
||||||
physics:
|
child: ConstrainedBox(
|
||||||
AlwaysScrollableScrollPhysics(),
|
constraints: BoxConstraints(
|
||||||
child: ConstrainedBox(
|
minHeight:
|
||||||
constraints: BoxConstraints(
|
viewportConstraints.maxHeight,
|
||||||
minHeight:
|
),
|
||||||
viewportConstraints.maxHeight,
|
child: Center(
|
||||||
),
|
child: Column(
|
||||||
child: Center(
|
children: [
|
||||||
child: Column(
|
Padding(
|
||||||
children: [
|
padding:
|
||||||
Padding(
|
const EdgeInsets.all(24),
|
||||||
padding:
|
child: StreamSvgIcon.search(
|
||||||
const EdgeInsets.all(24),
|
size: 96,
|
||||||
child: StreamSvgIcon.search(
|
color: Colors.grey,
|
||||||
size: 96,
|
|
||||||
color: Colors.grey,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Text(
|
),
|
||||||
AppLocalizations.of(context)
|
Text(
|
||||||
.noUserMatchesTheseKeywords,
|
AppLocalizations.of(context)
|
||||||
style: StreamChatTheme.of(
|
.noUserMatchesTheseKeywords,
|
||||||
context)
|
style: StreamChatTheme.of(
|
||||||
.textTheme
|
context)
|
||||||
.footnote
|
.textTheme
|
||||||
.copyWith(
|
.footnote
|
||||||
color: StreamChatTheme
|
.copyWith(
|
||||||
.of(context)
|
color: StreamChatTheme
|
||||||
.colorTheme
|
.of(context)
|
||||||
.textHighEmphasis
|
.colorTheme
|
||||||
.withOpacity(.5)),
|
.textHighEmphasis
|
||||||
),
|
.withOpacity(.5)),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
},
|
);
|
||||||
);
|
},
|
||||||
},
|
);
|
||||||
),
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: FutureBuilder<bool>(
|
: FutureBuilder<bool>(
|
||||||
|
|||||||
Reference in New Issue
Block a user