feat: Added message reply

This commit is contained in:
Deven Joshi
2021-01-20 16:21:03 +05:30
parent ded8b37e61
commit d48ccf15df
8 changed files with 84 additions and 26 deletions
@@ -15,6 +15,7 @@ class VideoAttachment extends StatefulWidget {
final Size size;
final Message message;
final ShowMessageCallback onShowMessage;
final ValueChanged<ReturnActionType> onReturnAction;
VideoAttachment({
Key key,
@@ -23,6 +24,7 @@ class VideoAttachment extends StatefulWidget {
this.message,
this.size,
this.onShowMessage,
this.onReturnAction,
}) : super(key: key);
@override
@@ -84,10 +86,10 @@ class _VideoAttachmentState extends State<VideoAttachment> {
});
return GestureDetector(
onTap: () {
onTap: () async {
final channel = StreamChannel.of(context).channel;
Navigator.push(
var res = await Navigator.push(
context,
MaterialPageRoute(
builder: (_) => StreamChannel(
@@ -102,6 +104,10 @@ class _VideoAttachmentState extends State<VideoAttachment> {
),
),
);
if (res != null) {
widget.onReturnAction(res);
}
},
child: Container(
height: widget.size?.height,