How can I get the project’s root folder in Flutter? Basically what is the equivalent of python’s os.path.dirname(os.path.abspath(__file__))
?
How can I get the project’s root folder in Flutter? Basically what is the equivalent of python’s os.path.dirname(os.path.abspath(__file__))
?
2
Answers
Im not sure what you mean but if you want app directory you can use this package
you can use
Directory.current
to get your projects root directory. This is the directory where your pubspec.yaml is located. Checkout an example below.