A Flutter project using the OpenWeatherMap API with best practices.
- Make a copy of the
.env.examplefile and name it.env. - In the
.envfile, modify theBASE_URLand theAPI_KEYvalues to the correct ones (e.g.BASE_URL=http://api.openweathermap.org/data/2.5. Please note that the base URL does not have the trailing/). Without these, the application will not run as required.
This project contains 3 flavours:
- development
- staging
- production
To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
# Development
$ flutter run --flavor development --target lib/main_development.dart
# Staging
$ flutter run --flavor staging --target lib/main_staging.dart
# Production
$ flutter run --flavor production --target lib/main_production.dartAlternatively, on Visual Studio Code:
- Go to
Run and Debug - Select either
Launch development,Launch stagingorLaunch productionthen click on theRunbutton as shown below
*WeatherApp works on iOS & Android.


