mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 14:59:29 +01:00
chore: Follow up file download type fix
This commit is contained in:
parent
99595caee5
commit
9bed679568
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
@ -22,6 +24,7 @@ extension LocalizedBody on Event {
|
|||||||
|
|
||||||
void shareFile(BuildContext context) async {
|
void shareFile(BuildContext context) async {
|
||||||
final matrixFile = await _getFile(context);
|
final matrixFile = await _getFile(context);
|
||||||
|
inspect(matrixFile);
|
||||||
|
|
||||||
matrixFile.result?.share(context);
|
matrixFile.result?.share(context);
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ extension MatrixFileExtension on MatrixFile {
|
|||||||
href: html.Url.createObjectUrlFromBlob(
|
href: html.Url.createObjectUrlFromBlob(
|
||||||
html.Blob(
|
html.Blob(
|
||||||
[bytes],
|
[bytes],
|
||||||
'application/octet-stream',
|
mimeType,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -87,7 +87,7 @@ extension MatrixFileExtension on MatrixFile {
|
|||||||
final box = context.findRenderObject() as RenderBox?;
|
final box = context.findRenderObject() as RenderBox?;
|
||||||
|
|
||||||
await Share.shareXFiles(
|
await Share.shareXFiles(
|
||||||
[XFile.fromData(bytes)],
|
[XFile.fromData(bytes, name: name, mimeType: mimeType)],
|
||||||
sharePositionOrigin:
|
sharePositionOrigin:
|
||||||
box == null ? null : box.localToGlobal(Offset.zero) & box.size,
|
box == null ? null : box.localToGlobal(Offset.zero) & box.size,
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user