fix: giphy fix, fmt

This commit is contained in:
Deven Joshi
2020-11-24 16:32:50 +05:30
parent 8640f2b4f9
commit 146204ed3a
2 changed files with 30 additions and 19 deletions
+12 -2
View File
@@ -63,7 +63,11 @@ class GiphyAttachment extends StatelessWidget {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (_) { Navigator.push(context, MaterialPageRoute(builder: (_) {
return FullScreenImage( final channel = StreamChannel.of(context).channel;
return StreamChannel(
channel: channel,
child: FullScreenImage(
urls: [ urls: [
attachment.imageUrl ?? attachment.imageUrl ??
attachment.assetUrl ?? attachment.assetUrl ??
@@ -72,6 +76,7 @@ class GiphyAttachment extends StatelessWidget {
userName: message.user.name, userName: message.user.name,
sentAt: message.createdAt, sentAt: message.createdAt,
message: message, message: message,
),
); );
})); }));
}, },
@@ -286,7 +291,11 @@ class GiphyAttachment extends StatelessWidget {
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (_) { Navigator.push(context, MaterialPageRoute(builder: (_) {
return FullScreenImage( var channel = StreamChannel.of(context).channel;
return StreamChannel(
channel: channel,
child: FullScreenImage(
urls: [ urls: [
attachment.imageUrl ?? attachment.imageUrl ??
attachment.assetUrl ?? attachment.assetUrl ??
@@ -295,6 +304,7 @@ class GiphyAttachment extends StatelessWidget {
userName: message.user.name, userName: message.user.name,
sentAt: message.createdAt, sentAt: message.createdAt,
message: message, message: message,
),
); );
})); }));
}, },
+2 -1
View File
@@ -159,7 +159,8 @@ class ImageActionsModal extends StatelessWidget {
dense: true, dense: true,
title: Text( title: Text(
title, title,
style: color == null ? titleStyle : titleStyle.copyWith(color: color), style:
color == null ? titleStyle : titleStyle.copyWith(color: color),
), ),
leading: Icon( leading: Icon(
iconData, iconData,