update 1:1 chatinfo ui

This commit is contained in:
Salvatore Giordano
2020-12-10 12:29:51 +01:00
parent df2d822315
commit b85ed04170
+6 -26
View File
@@ -67,7 +67,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
_buildConnectedTitleState(), _buildConnectedTitleState(),
SizedBox(height: 15.0), SizedBox(height: 15.0),
_OptionListTile( _OptionListTile(
title: '@user', title: '@${widget.user.id}',
trailing: Padding( trailing: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Text( child: Text(
@@ -156,7 +156,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
// onTap: () {}, // onTap: () {},
// ), // ),
_OptionListTile( _OptionListTile(
title: '615 Photos & Videos', title: 'Photos & Videos',
leading: StreamSvgIcon.pictures( leading: StreamSvgIcon.pictures(
size: 32.0, size: 32.0,
color: Colors.black.withOpacity(0.5), color: Colors.black.withOpacity(0.5),
@@ -168,7 +168,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
}, },
), ),
_OptionListTile( _OptionListTile(
title: '8 Files', title: 'Files',
leading: StreamSvgIcon.files( leading: StreamSvgIcon.files(
size: 32.0, size: 32.0,
color: Colors.black.withOpacity(0.5), color: Colors.black.withOpacity(0.5),
@@ -179,27 +179,8 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
MaterialPageRoute(builder: (context) => _FileDisplayScreen())); MaterialPageRoute(builder: (context) => _FileDisplayScreen()));
}, },
), ),
StreamBuilder<List<Channel>>( _OptionListTile(
stream: StreamChat.of(context).client.queryChannels( title: 'Shared groups',
filter: {
r'$and': [
{
'members': {
r'$in': [widget.user.id],
},
},
{
'members': {
r'$in': [StreamChat.of(context).user.id],
},
}
],
},
),
builder: (context, snapshot) {
return _OptionListTile(
title:
'${snapshot.data == null ? '0' : snapshot.data.length} Shared groups',
leading: StreamSvgIcon.Icon_group( leading: StreamSvgIcon.Icon_group(
size: 24.0, size: 24.0,
color: Colors.black.withOpacity(0.5), color: Colors.black.withOpacity(0.5),
@@ -212,8 +193,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
builder: (context) => _SharedGroupsScreen( builder: (context) => _SharedGroupsScreen(
StreamChat.of(context).user, widget.user))); StreamChat.of(context).user, widget.user)));
}, },
); ),
}),
], ],
); );
} }