Gave this error in subspece.yaml after add a git
flutter:
uses-material-design: true
assets:
- .env
- assets/images/
- assets/icons/
fonts:
- family: SFPro DisplayRegular
fonts:
- asset: assets/fonts/sf_pro/SFPro_display_regular.ttf
Ensure that the .env file is located at the root of your project folder, at the same level as your pubspec.yaml file, since that is where you've specified it should be found.
If your .env file is not supposed to be in the root folder of your project or is in a different directory, you will need to update the resource path in your pubspec.yaml file accordingly. For example, if the .env file is inside the config folder, you should update the resources section as follows: