feat: Added message reply
This commit is contained in:
@@ -13,6 +13,7 @@ class GiphyAttachment extends StatelessWidget {
|
||||
final Message message;
|
||||
final Size size;
|
||||
final ShowMessageCallback onShowMessage;
|
||||
final ValueChanged<ReturnActionType> onReturnAction;
|
||||
|
||||
const GiphyAttachment({
|
||||
Key key,
|
||||
@@ -21,6 +22,7 @@ class GiphyAttachment extends StatelessWidget {
|
||||
this.message,
|
||||
this.size,
|
||||
this.onShowMessage,
|
||||
this.onReturnAction,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@@ -65,8 +67,9 @@ class GiphyAttachment extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (_) {
|
||||
onTap: () async {
|
||||
var res = await Navigator.push(context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
final channel = StreamChannel.of(context).channel;
|
||||
|
||||
return StreamChannel(
|
||||
@@ -82,6 +85,10 @@ class GiphyAttachment extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}));
|
||||
|
||||
if (res != null) {
|
||||
onReturnAction(res);
|
||||
}
|
||||
},
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
@@ -320,8 +327,9 @@ class GiphyAttachment extends StatelessWidget {
|
||||
Widget _buildSentAttachment(context) {
|
||||
return Container(
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (_) {
|
||||
onTap: () async {
|
||||
var res =
|
||||
await Navigator.push(context, MaterialPageRoute(builder: (_) {
|
||||
var channel = StreamChannel.of(context).channel;
|
||||
|
||||
return StreamChannel(
|
||||
@@ -337,6 +345,10 @@ class GiphyAttachment extends StatelessWidget {
|
||||
),
|
||||
);
|
||||
}));
|
||||
|
||||
if (res != null) {
|
||||
onReturnAction(res);
|
||||
}
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user