workaround for a weird error while uploading the image for the first time
This commit is contained in:
@@ -1029,7 +1029,11 @@ class MessageInputState extends State<MessageInput> {
|
|||||||
setState(() {
|
setState(() {
|
||||||
_attachments.add(attachment);
|
_attachments.add(attachment);
|
||||||
});
|
});
|
||||||
final mediaFile = await medium.originFile;
|
|
||||||
|
final mediaFile = await medium.originFile.timeout(
|
||||||
|
Duration(seconds: 5),
|
||||||
|
onTimeout: () => medium.originFile,
|
||||||
|
);
|
||||||
|
|
||||||
var file = PlatformFile(
|
var file = PlatformFile(
|
||||||
path: mediaFile.path,
|
path: mediaFile.path,
|
||||||
|
|||||||
Reference in New Issue
Block a user