fixed deprecation issues

This commit is contained in:
sonykurian96
2021-07-28 21:19:09 +05:30
parent d5cff7e2c2
commit ffe11de4f9
10 changed files with 24 additions and 24 deletions
@@ -58,7 +58,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
'owner',
].contains(channel.state!.members
.firstWhereOrNull(
(m) => m.userId == channel.client.state.user!.id)
(m) => m.userId == channel.client.state.currentUser!.id)
?.role))
_buildDeleteListTile(),
],
@@ -385,7 +385,7 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
context,
MaterialPageRoute(
builder: (context) => _SharedGroupsScreen(
StreamChat.of(context).user, widget.user)));
StreamChat.of(context).currentUser, widget.user)));
},
),
],
@@ -603,7 +603,7 @@ class __SharedGroupsScreenState extends State<_SharedGroupsScreen> {
String? title;
if (extraData['name'] == null) {
final otherMembers = members.where(
(member) => member.userId != StreamChat.of(context).user!.id);
(member) => member.userId != StreamChat.of(context).currentUser!.id);
if (otherMembers.isNotEmpty) {
final maxWidth = constraints.maxWidth;
final maxChars = maxWidth / textStyle.fontSize!;