Merge branch 'develop' into feat/exposeAttachmentActionsModal
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
## Upcoming
|
## Upcoming
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
[#1463](https://github.com/GetStream/stream-chat-flutter/pull/1463) Fixed support for iPad in the share button for images.
|
||||||
|
|
||||||
✅ Added
|
✅ Added
|
||||||
|
|
||||||
- Now it is possible to customize the max lines of the title of a url attachment. Before it was always 1 line.
|
- Now it is possible to customize the max lines of the title of a url attachment. Before it was always 1 line.
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ class StreamGalleryFooter extends StatefulWidget
|
|||||||
|
|
||||||
class _StreamGalleryFooterState extends State<StreamGalleryFooter> {
|
class _StreamGalleryFooterState extends State<StreamGalleryFooter> {
|
||||||
final shareButtonKey = GlobalKey();
|
final shareButtonKey = GlobalKey();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
const showShareButton = !kIsWeb;
|
const showShareButton = !kIsWeb;
|
||||||
@@ -107,12 +108,19 @@ class _StreamGalleryFooterState extends State<StreamGalleryFooter> {
|
|||||||
await file.writeAsBytes(bytes);
|
await file.writeAsBytes(bytes);
|
||||||
final box =
|
final box =
|
||||||
shareButtonKey.currentContext?.findRenderObject();
|
shareButtonKey.currentContext?.findRenderObject();
|
||||||
|
final size = shareButtonKey.currentContext?.size;
|
||||||
|
|
||||||
final position =
|
final position =
|
||||||
(box! as RenderBox).localToGlobal(Offset.zero);
|
(box! as RenderBox).localToGlobal(Offset.zero);
|
||||||
|
|
||||||
await Share.shareXFiles(
|
await Share.shareXFiles(
|
||||||
[XFile(filePath)],
|
[XFile(filePath)],
|
||||||
sharePositionOrigin:
|
sharePositionOrigin: Rect.fromLTWH(
|
||||||
Rect.fromLTWH(position.dx, position.dy, 0, 0),
|
position.dx,
|
||||||
|
position.dy,
|
||||||
|
size?.width ?? 50,
|
||||||
|
(size?.height ?? 2) / 2,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user