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
+12 -3
View File
@@ -25,12 +25,15 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
/// Callback to call when the image is tapped.
final VoidCallback onImageTap;
final Message message;
final String userName;
final String sentAt;
/// Creates a channel header
ImageHeader({
Key key,
this.message,
this.showBackButton = true,
this.onBackPressed,
this.onTitleTap,
@@ -103,12 +106,18 @@ class ImageHeader extends StatelessWidget implements PreferredSizeWidget {
final Size preferredSize;
void _showMessageActionModalBottomSheet(BuildContext context) {
final channel = StreamChannel.of(context).channel;
showDialog(
context: context,
builder: (context) {
return ImageActionsModal(
userName: userName,
sentAt: sentAt,
return StreamChannel(
channel: channel,
child: ImageActionsModal(
userName: userName,
sentAt: sentAt,
message: message,
),
);
});
}