Minor ui fixes

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2020-12-30 12:45:16 +05:30
parent 9c53a295ae
commit 27578c7a0a
4 changed files with 82 additions and 40 deletions
+32 -1
View File
@@ -381,12 +381,43 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> {
},
),
builder: (context, snapshot) {
if (snapshot.data == null) {
if (!snapshot.hasData) {
return Center(
child: CircularProgressIndicator(),
);
}
if (snapshot.data.isEmpty) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
StreamSvgIcon.message(
size: 136.0,
color: Color(0xffdbdbdb),
),
SizedBox(height: 16.0),
Text(
'No Shared Groups',
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000),
),
),
SizedBox(height: 8.0),
Text(
'Group shared with User will appear here.',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.0,
color: Color(0xff000000).withOpacity(0.5),
),
),
],
),
);
}
return ListView.builder(
itemCount: snapshot.data.length,
itemBuilder: (context, position) {
+24 -22
View File
@@ -671,32 +671,34 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
);
}),
_buildModalListTile(
StreamSvgIcon.message(
color: Color(0xff7a7a7a),
size: 24.0,
),
'Message', () async {
var client = StreamChat.of(context).client;
StreamSvgIcon.message(
color: Color(0xff7a7a7a),
size: 24.0,
),
'Message',
() async {
var client = StreamChat.of(context).client;
var c = client.channel('messaging', extraData: {
'members': [
user.id,
StreamChat.of(context).user.id,
],
});
var c = client.channel('messaging', extraData: {
'members': [
user.id,
StreamChat.of(context).user.id,
],
});
await c.watch();
await c.watch();
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: c,
child: ChannelPage(),
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: c,
child: ChannelPage(),
),
),
),
);
}),
);
},
),
if (!channel.isDistinct &&
StreamChat.of(context).user.id != user.id &&
isUserAdmin)