@@ -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) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user