feat: Added sharing and added actions for buttons

This commit is contained in:
Deven Joshi
2020-11-19 21:01:17 +05:30
parent dd829e18bc
commit 412c721ab8
7 changed files with 397 additions and 284 deletions
+24 -12
View File
@@ -64,14 +64,20 @@ class GiphyAttachment extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: GestureDetector(
onTap: () {
final channel = StreamChannel.of(context).channel;
Navigator.push(context,
MaterialPageRoute(builder: (_) {
return FullScreenImage(
urls: [attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl],
userName: message.user.name,
sentAt: message.createdAt,
return StreamChannel(
channel: channel,
child: FullScreenImage(
urls: [attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl],
userName: message.user.name,
sentAt: message.createdAt,
message: message,
),
);
}));
},
@@ -299,13 +305,19 @@ class GiphyAttachment extends StatelessWidget {
clipBehavior: Clip.antiAlias,
child: GestureDetector(
onTap: () {
final channel = StreamChannel.of(context).channel;
Navigator.push(context, MaterialPageRoute(builder: (_) {
return FullScreenImage(
urls: [attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl],
userName: message.user.name,
sentAt: message.createdAt,
return StreamChannel(
channel: channel,
child: FullScreenImage(
urls: [attachment.imageUrl ??
attachment.assetUrl ??
attachment.thumbUrl],
userName: message.user.name,
sentAt: message.createdAt,
message: message,
),
);
}));
},