use .toFilePath instead
This commit is contained in:
+3
-4
@@ -123,10 +123,9 @@ class StreamAttachmentHandler extends StreamAttachmentHandlerBase {
|
|||||||
|
|
||||||
final tempDir = await getTemporaryDirectory();
|
final tempDir = await getTemporaryDirectory();
|
||||||
final tempPath = Uri.file(tempDir.path, windows: CurrentPlatform.isWindows);
|
final tempPath = Uri.file(tempDir.path, windows: CurrentPlatform.isWindows);
|
||||||
var tempFilePath = tempPath.resolve(fileName!).path;
|
final tempFilePath = tempPath
|
||||||
if (CurrentPlatform.isWindows && tempFilePath.startsWith('/')) {
|
.resolve(fileName!)
|
||||||
tempFilePath = tempFilePath.substring(1);
|
.toFilePath(windows: CurrentPlatform.isWindows);
|
||||||
}
|
|
||||||
print(tempFilePath);
|
print(tempFilePath);
|
||||||
|
|
||||||
final attachmentFileBytes = attachmentFile.bytes;
|
final attachmentFileBytes = attachmentFile.bytes;
|
||||||
|
|||||||
Reference in New Issue
Block a user