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
@@ -1,3 +1,5 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -348,3 +350,21 @@ StreamSvgIcon getFileTypeImage(String type) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Widget wrapAttachmentWidget(
|
||||
BuildContext context,
|
||||
Widget attachmentWidget,
|
||||
ShapeBorder attachmentShape,
|
||||
bool reverse,
|
||||
) {
|
||||
return Material(
|
||||
clipBehavior: Clip.antiAlias,
|
||||
shape: attachmentShape,
|
||||
type: MaterialType.transparency,
|
||||
child: Transform(
|
||||
transform: Matrix4.rotationY(reverse ? pi : 0),
|
||||
alignment: Alignment.center,
|
||||
child: attachmentWidget,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user