diff --git a/lib/src/giphy_attachment.dart b/lib/src/giphy_attachment.dart index bb859263..43e0ce68 100644 --- a/lib/src/giphy_attachment.dart +++ b/lib/src/giphy_attachment.dart @@ -63,15 +63,20 @@ class GiphyAttachment extends StatelessWidget { child: GestureDetector( onTap: () { Navigator.push(context, MaterialPageRoute(builder: (_) { - return FullScreenImage( - urls: [ - attachment.imageUrl ?? - attachment.assetUrl ?? - attachment.thumbUrl - ], - userName: message.user.name, - sentAt: message.createdAt, - message: message, + final channel = StreamChannel.of(context).channel; + + return StreamChannel( + channel: channel, + child: FullScreenImage( + urls: [ + attachment.imageUrl ?? + attachment.assetUrl ?? + attachment.thumbUrl + ], + userName: message.user.name, + sentAt: message.createdAt, + message: message, + ), ); })); }, @@ -286,15 +291,20 @@ class GiphyAttachment extends StatelessWidget { child: GestureDetector( onTap: () { Navigator.push(context, MaterialPageRoute(builder: (_) { - return FullScreenImage( - urls: [ - attachment.imageUrl ?? - attachment.assetUrl ?? - attachment.thumbUrl - ], - userName: message.user.name, - sentAt: message.createdAt, - message: message, + var channel = StreamChannel.of(context).channel; + + return StreamChannel( + channel: channel, + child: FullScreenImage( + urls: [ + attachment.imageUrl ?? + attachment.assetUrl ?? + attachment.thumbUrl + ], + userName: message.user.name, + sentAt: message.createdAt, + message: message, + ), ); })); }, diff --git a/lib/src/image_actions_modal.dart b/lib/src/image_actions_modal.dart index 1bfb6aa3..c1163af8 100644 --- a/lib/src/image_actions_modal.dart +++ b/lib/src/image_actions_modal.dart @@ -159,7 +159,8 @@ class ImageActionsModal extends StatelessWidget { dense: true, title: Text( title, - style: color == null ? titleStyle : titleStyle.copyWith(color: color), + style: + color == null ? titleStyle : titleStyle.copyWith(color: color), ), leading: Icon( iconData,