Loading images from file in FlutterHow do I check whether a file exists without exceptions?How do I copy a file in Python?How do I create a Java string from the contents of a file?Lazy load of images in ListViewUndo working copy modifications of one file in Git?How do I include a JavaScript file in another JavaScript file?How to get the value from the GET parameters?Writing files in Node.jsHow to read a file line-by-line into a list?How do you append to a file in Python?
How does Captain America channel this power?
Don’t seats that recline flat defeat the purpose of having seatbelts?
Why didn't the Space Shuttle bounce back into space as many times as possible so as to lose a lot of kinetic energy up there?
As an international instructor, should I openly talk about my accent?
What's the polite way to say "I need to urinate"?
Aligning equation numbers vertically
What are the characteristics of a typeless programming language?
"You've called the wrong number" or "You called the wrong number"
"Whatever a Russian does, they end up making the Kalashnikov gun"? Are there any similar proverbs in English?
If a planet has 3 moons, is it possible to have triple Full/New Moons at once?
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
Elements other than carbon that can form many different compounds by bonding to themselves?
Classification of surfaces
555 timer FM transmitter
Critique of timeline aesthetic
a sore throat vs a strep throat vs strep throat
What does ゆーか mean?
Can SQL Server create collisions in system generated constraint names?
What is the philosophical significance of speech acts/implicature?
How come there are so many candidates for the 2020 Democratic party presidential nomination?
Can we say “you can pay when the order gets ready”?
Apply MapThread to all but one variable
Dynamic SOQL query relationship with field visibility for Users
can anyone help me with this awful query plan?
Loading images from file in Flutter
How do I check whether a file exists without exceptions?How do I copy a file in Python?How do I create a Java string from the contents of a file?Lazy load of images in ListViewUndo working copy modifications of one file in Git?How do I include a JavaScript file in another JavaScript file?How to get the value from the GET parameters?Writing files in Node.jsHow to read a file line-by-line into a list?How do you append to a file in Python?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I've tried using Image.file() by providing a File object made from an absolute URL string which I obtain from UIImagePickerController on iOS. Here's my code
//this line gets the absolute string from the URL of the file selected by user
var urlString = await platformChannel.invokeMethod("letUserPickImage")
//create File
File imageFile = File(urlString)
//create Image from File
Image.file(
imageFile,
height: 50,
weight: 50,
fit: BoxFit.contain,
),
However, the app crashes with message that the file pointed to doesn't exist, although the file exists.
Any help appreciated
ios file url flutter uri
add a comment |
I've tried using Image.file() by providing a File object made from an absolute URL string which I obtain from UIImagePickerController on iOS. Here's my code
//this line gets the absolute string from the URL of the file selected by user
var urlString = await platformChannel.invokeMethod("letUserPickImage")
//create File
File imageFile = File(urlString)
//create Image from File
Image.file(
imageFile,
height: 50,
weight: 50,
fit: BoxFit.contain,
),
However, the app crashes with message that the file pointed to doesn't exist, although the file exists.
Any help appreciated
ios file url flutter uri
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15
add a comment |
I've tried using Image.file() by providing a File object made from an absolute URL string which I obtain from UIImagePickerController on iOS. Here's my code
//this line gets the absolute string from the URL of the file selected by user
var urlString = await platformChannel.invokeMethod("letUserPickImage")
//create File
File imageFile = File(urlString)
//create Image from File
Image.file(
imageFile,
height: 50,
weight: 50,
fit: BoxFit.contain,
),
However, the app crashes with message that the file pointed to doesn't exist, although the file exists.
Any help appreciated
ios file url flutter uri
I've tried using Image.file() by providing a File object made from an absolute URL string which I obtain from UIImagePickerController on iOS. Here's my code
//this line gets the absolute string from the URL of the file selected by user
var urlString = await platformChannel.invokeMethod("letUserPickImage")
//create File
File imageFile = File(urlString)
//create Image from File
Image.file(
imageFile,
height: 50,
weight: 50,
fit: BoxFit.contain,
),
However, the app crashes with message that the file pointed to doesn't exist, although the file exists.
Any help appreciated
ios file url flutter uri
ios file url flutter uri
asked Mar 22 at 17:21
krishnakeshankrishnakeshan
858
858
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15
add a comment |
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55304818%2floading-images-from-file-in-flutter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55304818%2floading-images-from-file-in-flutter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
The file does not exist if the error message states this. Your path is not transported correctly.
– creativecreatorormaybenot
Mar 22 at 19:25
The error message in the logs in VS Code show the output URL in the message saying it doesn't exist. However, when I CMD+Click on the link in the logs, it takes me to the file on the laptop's hard drive. So the path exists is what I can make out from that
– krishnakeshan
Mar 23 at 4:16
So it does not exist on your iOS Simulator? Why do you expect to be able to get files from your hard drive on your iOS device?
– creativecreatorormaybenot
Mar 23 at 14:15