fix: attachment builder (#326)
* feat: Changed attachment builder structure * fix: fixed image attachments * feat: Added onTaps to remaining attachments * fix: merged fixes * add trailing comma Co-authored-by: Salvatore Giordano <[email protected]>
This commit is contained in:
co-authored by
Salvatore Giordano
parent
1ed11a753f
commit
4b6f1f54b6
@@ -15,6 +15,7 @@ class GiphyAttachment extends AttachmentWidget {
|
||||
final MessageTheme messageTheme;
|
||||
final ShowMessageCallback onShowMessage;
|
||||
final ValueChanged<ReturnActionType> onReturnAction;
|
||||
final VoidCallback onAttachmentTap;
|
||||
|
||||
const GiphyAttachment({
|
||||
Key key,
|
||||
@@ -24,6 +25,7 @@ class GiphyAttachment extends AttachmentWidget {
|
||||
this.messageTheme,
|
||||
this.onShowMessage,
|
||||
this.onReturnAction,
|
||||
this.onAttachmentTap,
|
||||
}) : super(key: key, message: message, attachment: attachment, size: size);
|
||||
|
||||
@override
|
||||
@@ -65,7 +67,7 @@ class GiphyAttachment extends AttachmentWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: GestureDetector(
|
||||
onTap: () => _onImageTap(context),
|
||||
onTap: () => onAttachmentTap ?? _onImageTap(context),
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(8),
|
||||
|
||||
Reference in New Issue
Block a user