I'm working on a flutter project and I want to create a new file inside my flutter project folder and not in my device storage. Is there a way to create this file and appear inside my folder like under the pubspec.yaml file.
-
1All files created are locally saved in device storage. Could you explain why you do not want it to be saved in device storage or what issue you face if it is saved in device storage?Vivek– Vivek2022-05-18 12:42:28 +00:00Commented May 18, 2022 at 12:42
-
In my case I want to create a file that contain user database information and save it in my flutter project because I will use it inside my code. But when I create a file it save in the default path downloads and you can't change the default path that's why I want to created it directly in my flutter project folderbeatfloraminederecho– beatfloraminederecho2022-05-18 12:45:51 +00:00Commented May 18, 2022 at 12:45
Add a comment
|
2 Answers
Alright, so you are trying to create a new file in one of the flutter project file but for some reason it ends up in Downloads folder. Have you tried to create a new file by right clicking on the lib folder and then choosing new file? This will create the file under lib folder. Same way, you could create any file under any desired folder within lib.
1 Comment
beatfloraminederecho
yes I know how to create a file, but in my case I want to create it and write inside of it from a function in my code.