'Create file inside flutter project folder

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.



Solution 1:[1]

If I understood correctly that you want to create a new file in the project folder in the application? This is not possible.

Solution 2:[2]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Maxitors
Solution 2