update 1:1 chatinfo ui

This commit is contained in:
Salvatore Giordano
2020-12-10 12:29:51 +01:00
parent df2d822315
commit b85ed04170
+18 -38
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,41 +179,21 @@ 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: { leading: StreamSvgIcon.Icon_group(
r'$and': [ size: 24.0,
{ color: Colors.black.withOpacity(0.5),
'members': { ),
r'$in': [widget.user.id], trailing: StreamSvgIcon.right(),
}, onTap: () {
}, Navigator.push(
{ context,
'members': { MaterialPageRoute(
r'$in': [StreamChat.of(context).user.id], builder: (context) => _SharedGroupsScreen(
}, StreamChat.of(context).user, widget.user)));
} },
], ),
},
),
builder: (context, snapshot) {
return _OptionListTile(
title:
'${snapshot.data == null ? '0' : snapshot.data.length} Shared groups',
leading: StreamSvgIcon.Icon_group(
size: 24.0,
color: Colors.black.withOpacity(0.5),
),
trailing: StreamSvgIcon.right(),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => _SharedGroupsScreen(
StreamChat.of(context).user, widget.user)));
},
);
}),
], ],
); );
} }