chore: migrate to latest dependencies

This commit is contained in:
Sahil Kumar
2021-10-05 16:23:30 +05:30
committed by xsahil03x
parent 38a6884465
commit 865ae2cbd7
22 changed files with 142 additions and 120 deletions
@@ -25,7 +25,7 @@ class ChatView extends StatelessWidget {
child: ChannelListView(
filter: Filter.in_(
'members',
[StreamChat.of(context).user!.id],
[StreamChat.of(context).currentUser!.id],
),
sort: [SortOption('last_message_at')],
channelPreviewBuilder: (context, channel) {
@@ -37,10 +37,11 @@ class ChatView extends StatelessWidget {
onImageTap: () {
String? name;
String? image;
final currentUser = StreamChat.of(context).client.state.user;
final currentUser =
StreamChat.of(context).client.state.currentUser;
if (channel.isGroup) {
name = channel.extraData['name'];
image = channel.extraData['image'];
name = channel.extraData['name'] as String?;
image = channel.extraData['image'] as String?;
} else {
final friend = channel.state!.members
.where((element) => element.userId != currentUser!.id)
@@ -10,9 +10,9 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart';
class SettingsView extends StatelessWidget {
@override
Widget build(BuildContext context) {
final user = StreamChat.of(context).client.state.user!;
final user = StreamChat.of(context).client.state.currentUser!;
final image = user.extraData['image'];
final textColor = Theme.of(context).appBarTheme.color;
final textColor = Theme.of(context).appBarTheme.backgroundColor;
return MultiBlocProvider(
providers: [
BlocProvider(