Flutter - Saving Files to Application Folder and Gallery | Flutter Tutorial

  Рет қаралды 54,468

RetroPortal Studio

RetroPortal Studio

3 жыл бұрын

#flutter #google #flutterapp
In this Flutter Tutorial, You will learn to Download Files to Application Specific Folder on Android Devices and Photos Library on iOS Devices.We will be using Dio Package to download Files from a URL and also calculate Progress of the ongoing download. We will also take a look at Handling Permissions for Storage. The knowledge you gain in this tutorial will also help you in other important Storage Related Tasks in Flutter.
Github: github.com/retroportalstudio/...
Medium (Article): / b8fh9oruzbb
🔥 Auto-Generate Flutter Custom Paint Code TRY THIS FREE TOOL👇:
👉 Flutter Shape Maker: fluttershapemaker.com
🔥 Learn About the Most Important Widgets in Flutter 👇:
👉 Widget Essentials Series: bit.ly/3GpfiYw
👉🏻 Product Hunt: www.producthunt.com/posts/flu...
(Your UPVOTE Means a lot! 🙌)
If you find this video useful consider Supporting @RetroPortal Studio :
👉 Buy Me a Coffee: www.buymeacoffee.com/theretro...
👉 Patreon: / retroportalstudio
Social Links @RetroPortal Studio :
👉 Twitter: / theretroportal
👉 Medium: / retroportalstudio
👉 Instagram: / retroportalstudio
👉 Patreon: / retroportalstudio
👉 GitHub: github.com/retroportalstudio
If you like the tutorial, please hit the LIKE and Subscribe button and also consider supporting me on Patreon or Buy Me a Coffee for More Flutter Tutorial on RetroPortal Studio.
Thank you for Watching! Happy Coding :)

Пікірлер: 113
@RetroPortalStudio
@RetroPortalStudio 3 жыл бұрын
If you find this video useful, consider Following me on: Twitter: twitter.com/theretroportal Instagram: instagram.com/retroportalstudio LinkedIn: www.linkedin.com/in/parasjainrps Git: github.com/retroportalstudio Happy Coding! ✌️😁
@abelharlem1327
@abelharlem1327 2 жыл бұрын
I dont mean to be so off topic but does any of you know of a way to get back into an instagram account..? I stupidly lost the account password. I would appreciate any tips you can give me.
@nitishgarg4716
@nitishgarg4716 2 жыл бұрын
amazing video, Thank you. Does it work for IOS also?
@brcglog3808
@brcglog3808 Жыл бұрын
it's so joyful watching your tutorial, thank you for this man, I appreciate it
@JuanPerez-vv5lk
@JuanPerez-vv5lk 2 жыл бұрын
I like the way you explain everything. Just try to have both the IDE and Emulator side by side, it's easier to follow the tutorial with both screen at the same time.
@sharbelokzan9673
@sharbelokzan9673 3 жыл бұрын
your tutorials are just perfect ❤️
@chrisbanas9118
@chrisbanas9118 3 жыл бұрын
This fixed days of headaches thank you so much
@FemiKolawole
@FemiKolawole 3 жыл бұрын
YOURE A GENIUS!!! THANK YOU FOR SHARING.
@mmpm
@mmpm 3 жыл бұрын
Thanks for the tutorial i appreciate your work man
@karthikr9288
@karthikr9288 3 жыл бұрын
Top content ! Thanks a lot 👍🏼
@vaibhavpallod1023
@vaibhavpallod1023 3 жыл бұрын
Thanks man you saved my day!
@BooSgu
@BooSgu 3 жыл бұрын
Thank you, this is verfy helpful!
@TupakulaChaithanya
@TupakulaChaithanya 6 ай бұрын
thanks man, its working
@usama_khalid
@usama_khalid 2 жыл бұрын
Thank you. This is extremely helpful...
@southpaw2576
@southpaw2576 2 жыл бұрын
Thanks a lot for this it helped me out a lot, but how about a download function where it doesn't show the file in the app folder? similar to youtube and netflix. Thanks!
@dheeraj5023
@dheeraj5023 3 жыл бұрын
really helpful this video, thankyou
@dgrippo
@dgrippo Жыл бұрын
Excellent video! Very well explained. Simple and clear. Well done. Question: I'd like to download csv files into the download directory. Is it possible to adapt this code? How can I do to move the file from the temporary directory to the download directory?
@GafarRisky
@GafarRisky 3 жыл бұрын
thank you so much ,, best of the best channel
@LakshayBhalla
@LakshayBhalla 3 жыл бұрын
Great video 👍🏻
@akailok
@akailok 3 жыл бұрын
Hey bro you explanation is best but can you develop small project in MVC you follow 1.MVC 2.Clean code 3.Test cases 4.multiple screen transition 5.app deployment. Please can cover this topics ,so that we can build app.👍
@hashankannangara8723
@hashankannangara8723 3 жыл бұрын
Important video❤️
@bharatkumaracademy720
@bharatkumaracademy720 2 жыл бұрын
awesome tutorial
@abdallahmbiola244
@abdallahmbiola244 Жыл бұрын
God bless you, thanks a lot
@konstantink2396
@konstantink2396 2 жыл бұрын
Дядя, лучший! Спасибо
@hamisirizwan9480
@hamisirizwan9480 Жыл бұрын
Nice tutorial. Really helped. How about when i want to view the downloaded file only within the app? similar to youtube and netflix. Thanks!
@ttae1141
@ttae1141 Жыл бұрын
thank you
@mohdazam3776
@mohdazam3776 3 жыл бұрын
Hello brother, Thanks for the amazing tutorial. Can I open the file as soon as it downloads? How can I do that?
@maen.kh_work
@maen.kh_work 5 ай бұрын
great video thank you, for future reference instead of using for loop, you can easily make split like this String s = directory.path ; s.split("Android/").first // /storage/emulated/0/
@hectorprx
@hectorprx 3 жыл бұрын
Thanks , Very Ncie
@user-ib8mw1oc9u
@user-ib8mw1oc9u 2 жыл бұрын
Very helpful! Maybe You know about API 30+, with MediaStore etc, how to implement it in Flutter?
@cryptoguests3095
@cryptoguests3095 2 жыл бұрын
thanks for this tutorial, it's very useful. I'm working on sound recorder, it seems the file are saved on temporary directory, but I want to create a folder for the App so that all the record can be saved there permanently. Please how can I accomplish this task?
@muhammadusamatariq4819
@muhammadusamatariq4819 3 жыл бұрын
We always use i or j variable in for loop. Its the law in programming. Do follow it. just kidding very nice tutorial thanks bro
@theautomationchannel6920
@theautomationchannel6920 2 жыл бұрын
*_That's very goood code_*
@sadhlife
@sadhlife 3 жыл бұрын
what's with the request legacy storage thing? what has changed with sdk 29+?
@nickcfc1
@nickcfc1 2 жыл бұрын
in 2022 your explanation still works which is something exceptional due to so many changes in android and flutter, congratulations, my problem is with the emulator that doesn't work, doesn't allow it, on mobile it works perfectly, do you have any tips?
@TechWithDnes
@TechWithDnes 3 жыл бұрын
Nice
@deborahmizfel8036
@deborahmizfel8036 2 жыл бұрын
Hello one question. Does the allow permission only appear once? Because I need it to appear every time I download the file.
@Snggle
@Snggle 3 жыл бұрын
how can i get this to save a file created on the app, to those storages places?
@zainansari1057
@zainansari1057 3 жыл бұрын
Thanks alot bro
@zainansari1057
@zainansari1057 3 жыл бұрын
Clean and perfect tutorial
@ryankurniantara1090
@ryankurniantara1090 Жыл бұрын
if we want to download a file in ios, its possible it save in image gallery saver ?
@AwaisQazichannel
@AwaisQazichannel Жыл бұрын
Can I open desitned folder in my app flutter
@egbuchulamalexanderginika3423
@egbuchulamalexanderginika3423 3 жыл бұрын
Good day, please how do I upload a video and get a URL like the one used on the video ...
@tanishq7046
@tanishq7046 3 жыл бұрын
first comment. Love it fast
@KuldeepSingh-dn9sc
@KuldeepSingh-dn9sc 3 жыл бұрын
Can you please help me When we receive json file from api Then save it into storage to read again when our app will start again How is this happen ❓❓❓ Which technique is used to store json file data
@noureddinetahar413
@noureddinetahar413 3 жыл бұрын
hi thank you for explanation and don't you mind could you upload another video to explain how to upload file from file manager (external storage) i had a trouble with file picker (the latest update) , i have now a project and i couldn't find the best source for helping me , please help me :(
@ailtondevesse4738
@ailtondevesse4738 Жыл бұрын
is there a way to replace the file if there's already a file with the same name ?
@manishsaxena2974
@manishsaxena2974 Жыл бұрын
can we save file in app only that are not access by gallary??
@shahmaarbaba
@shahmaarbaba 5 ай бұрын
can u please make a tutorial for a simple camera app which click a photo and save into custom location in phone
@mohitnakum
@mohitnakum 3 жыл бұрын
👏👏
@vitordalefi1421
@vitordalefi1421 Жыл бұрын
Hello, thanks for the video. It's very simple to understand with its didactics. I'm getting this problem: "I/flutter (20628): FileSystemException: Creation failed, path = '/storage/emulated/0/OnlaineApp' (OS Error: Permission denied, errno = 13)" , how can I fix it?
@MrGansoSalvaje
@MrGansoSalvaje Жыл бұрын
in the instruction await directory.create(recursive: true); return the next errror : FileSystemException: Creation failed, path = '/storage/emulated/0/RpsApp' (OS Error: Permission denied, errno = 13) and before the error the app ask me is I allowed to give permision
@mianarslan1239
@mianarslan1239 3 жыл бұрын
please answer a big fan here! 1. How can I download video from firebase storage like youtube App which is only accessible in App? 2. How can I show that video in download session of our app without internet?
@zahrasgari
@zahrasgari 2 ай бұрын
I place ur url in the same exact code but when the phone download it it wont open and says (cant open this link) i dont know how to fix that?
@user-ot2xn3wo8p
@user-ot2xn3wo8p 6 ай бұрын
But is it possible to save the file in external storage? Without going for hidden private data of android, the file should be visible externally.
@muhammadrasul1581
@muhammadrasul1581 2 жыл бұрын
so you downloaded the video, but let's say you downloaded a pdf to the folder in the phone so how would you be able to read the downloaded pdf in the application?
@obviousabsurdity3181
@obviousabsurdity3181 2 жыл бұрын
Great video, cant find many on saving to local storage properly, My only issues is that I keep getting the error creation failed, operation not permitted even though its requesting and returning granted. Any thought?
@aayushstha4137
@aayushstha4137 2 жыл бұрын
Hey! Did you find any solution?
@MrZawe
@MrZawe 3 жыл бұрын
Do read write files please
@Webdesignanddevelopment
@Webdesignanddevelopment 2 жыл бұрын
please update this tutorial. Thanks in advance
@jubairhossain2117
@jubairhossain2117 2 жыл бұрын
What if we want to save the file in Downloads Directory for IOS?
@nikalags
@nikalags 2 жыл бұрын
I try to find out too now
@samippaudel266
@samippaudel266 2 жыл бұрын
How to save file ?Please Explain
@Blazar0
@Blazar0 3 жыл бұрын
hi, does it work for android 11 ? thank you
@vrajendramandloi5917
@vrajendramandloi5917 2 жыл бұрын
did you got any solution for this i.e. Android 11.
@longdyleng4271
@longdyleng4271 3 жыл бұрын
Could you do for saving into real devices like android phone?
@nitishgarg4716
@nitishgarg4716 3 жыл бұрын
hey there! I hope you are doing well, have you find the solution. If yes Please share.
@ashutoshtiwari6104
@ashutoshtiwari6104 2 жыл бұрын
Creation failed, path = '/storage/emulated/0/RPSApp' (OS Error: Operation not permitted, errno = 1)
@shunmuagapriya9877
@shunmuagapriya9877 3 жыл бұрын
my files image a how to display my emulator view example status download app view
@moeinkpr9100
@moeinkpr9100 3 жыл бұрын
thank you for your tutorial. excuse me source code which see in above video don't work for android 11. do you have any solve for this problem??
@RetroPortalStudio
@RetroPortalStudio 3 жыл бұрын
I am trying for figure out a solution for that! Once i find one, i'll sure make a video on that!
@vrajendramandloi5917
@vrajendramandloi5917 2 жыл бұрын
@@RetroPortalStudio have u made a video on that ??
@vrajendramandloi5917
@vrajendramandloi5917 2 жыл бұрын
did you got any solution ??
@moeinkpr9100
@moeinkpr9100 2 жыл бұрын
@@vrajendramandloi5917 I forgot how to solve that but i think bottom source code is useful and remember I solve that with add another permission if (await _requestPermission(Permission.storage) && await _requestPermission(Permission.manageExternalStorage) && await _requestPermission(Permission.photos) && await _requestPermission(Permission.mediaLibrary)
@codinghtml3331
@codinghtml3331 Жыл бұрын
@@moeinkpr9100 Thank you, this actually helped me :)
@Alamsyah-qu5cf
@Alamsyah-qu5cf 3 жыл бұрын
Can someone help me? I've got error: FileSystemException: Creation failed, path = '/storage/emulated/0/Report' (OS Error: Operation not permitted, errno = 1) even after I allowed the permission? I'm developing using an android 11 device, is this a problem for android 11?
@DelgadoRecords
@DelgadoRecords 2 жыл бұрын
did you fix it? how?
@niroopnife9044
@niroopnife9044 2 жыл бұрын
@@DelgadoRecords Try by setting the compileSdkVersion and targetSdkVersion to 29
@UmeshKumar-gj1tf
@UmeshKumar-gj1tf 2 жыл бұрын
try using your phone instead of emulated phone. Also add one more permission in android manifest -> and after installing that app in your physical phone allow it permission from app info to full media access and it gets fixed !!!!!!!!
@cybrrxgegames8370
@cybrrxgegames8370 2 жыл бұрын
Hey. Is it possible to "grab the file" without a file or image picker so the user is not forced to open the files folder on his phone and to post this on a server?
@amanjain6084
@amanjain6084 2 жыл бұрын
Then how you want it to happen can i know
@cybrrxgegames8370
@cybrrxgegames8370 2 жыл бұрын
@@amanjain6084 Actually I found a way. I download i file from firebase in a new folder which gets created before downöoading and saves it into this folder. Now i can automatically delcare a new file from the path which the file got saved to. Now I can use this file without even picking a file by myself in app, so the app does it for the user.
@vrajendramandloi5917
@vrajendramandloi5917 2 жыл бұрын
This Approach is not working for Android 11. do you have any solution for that. i tried to replicate exactly the same way but it is not getting created. ** when i try to run the app via connecting to laptop this works .. but it does not work when i build a APK and deploy to a mobile.. Path and all is absolutely correct i have checked it via dialogs.
@abraiyan7984
@abraiyan7984 3 жыл бұрын
First one.
@Ok-Chance
@Ok-Chance 2 жыл бұрын
not working anymore , please update it ! thanks for effort
@imyogisingh
@imyogisingh 3 жыл бұрын
Sir , there is a issue ! Whenever we download any image or video using dio and then saving it any custom folder we made in the external directory . the file is saved but the issue is that it is not showing in the gallery ! What should we do
@desmondmiles8544
@desmondmiles8544 3 жыл бұрын
did you solved that?
@imyogisingh
@imyogisingh 3 жыл бұрын
@@desmondmiles8544 yes ! Resolved it
@nitishgarg4716
@nitishgarg4716 3 жыл бұрын
@@imyogisingh Please share. How?
@imyogisingh
@imyogisingh 3 жыл бұрын
@@nitishgarg4716 just use Register callback in the init state !
@nitishgarg4716
@nitishgarg4716 3 жыл бұрын
@@imyogisingh I didn't understand can you please explain in details. Actually I am new to flutter, Can I get your contact number or something. Please help.
@hardiklakhalani6268
@hardiklakhalani6268 2 жыл бұрын
Flutter sucks at Managing storage files! But we still gotta roll with it 🤷🏻‍♂️
@zainansari1057
@zainansari1057 3 жыл бұрын
Hy Can you help me? I am unable to download any file in android 11. I can download files in the Android/data/package_name folder but when I am trying to access the download folder or movies folder I can't write data there.
@nitishgarg4716
@nitishgarg4716 3 жыл бұрын
hey there! I hope you are doing well, I am facing kind of same problem Videos are not saving in the gallery , Please help if you know why.
@zainansari1057
@zainansari1057 3 жыл бұрын
@@nitishgarg4716 you can't directly save files to storage
@zainansari1057
@zainansari1057 3 жыл бұрын
@@nitishgarg4716 I found a solution btw
@zainansari1057
@zainansari1057 3 жыл бұрын
@@nitishgarg4716 I am working on it
@nitishgarg4716
@nitishgarg4716 3 жыл бұрын
@@zainansari1057 ok
@aniketkumarsinha2537
@aniketkumarsinha2537 3 жыл бұрын
FileSystemException: Creation failed, path = '/storage/emulated/0/Papers' (OS Error: Operation not permitted, errno = 1) Getting this error....plzz help anyone
@armynoncomtools3643
@armynoncomtools3643 3 жыл бұрын
Did you ever find an answer to this error?
@aniketkumarsinha2537
@aniketkumarsinha2537 3 жыл бұрын
@@armynoncomtools3643 no
@chrisbanas9118
@chrisbanas9118 3 жыл бұрын
@@aniketkumarsinha2537 I found a fix, you most likely have your SDK versions in the build.gradle set to 30. I set mine to 29 and had to use the same plugin versions that the youtuber’s github repo had and ran my flutter app with null safety off
@chrisbanas9118
@chrisbanas9118 3 жыл бұрын
@@armynoncomtools3643 Check my reply
@armynoncomtools3643
@armynoncomtools3643 3 жыл бұрын
@@aniketkumarsinha2537 I found the answer. You need to request permission to Permission.manageExternalStorage instead of Permission.storage
how to integrate downloading feature in flutter application
28:41
Easy Approach
Рет қаралды 33 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 57 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 39 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Top 10 Widgets every Flutter Developer should know!
17:17
RetroPortal Studio
Рет қаралды 281 М.
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Рет қаралды 752 М.
Top 30 Flutter Tips and Tricks
6:50
Flutter Mapp
Рет қаралды 544 М.
How to Read/Write Text, JSON, and Image Files in Flutter
45:45
The Flutter Factory
Рет қаралды 20 М.
Top 70 Flutter Tips, Widgets & Packages
16:22
Flutter Mapp
Рет қаралды 126 М.
The Story of Next.js
12:13
uidotdev
Рет қаралды 559 М.
Опасность фирменной зарядки Apple
0:57
SuperCrastan
Рет қаралды 11 МЛН
Хакер взломал компьютер с USB кабеля. Кевин Митник.
0:58
Последний Оплот Безопасности
Рет қаралды 2,1 МЛН