feat: Added show in chat

This commit is contained in:
Deven Joshi
2021-01-04 16:00:20 +05:30
parent 43446713c8
commit 95d91f3959
12 changed files with 123 additions and 6 deletions
+21
View File
@@ -517,6 +517,27 @@ class ChannelPage extends StatelessWidget {
parent: parentMessage,
);
},
onShowMessage: (m, c) async {
final client = StreamChat.of(context).client;
final message = m;
final channel = client.channel(
c.type,
id: c.id,
);
if (channel.state == null) {
await channel.watch();
}
Navigator.pop(context);
Navigator.pop(context);
Navigator.pushReplacementNamed(
context,
Routes.CHANNEL_PAGE,
arguments: ChannelPageArgs(
channel: channel,
initialMessage: message,
),
);
},
),
Positioned(
bottom: 0,