A simple weather app built with Flutter that displays current weather information for a specified city. The app makes use of the Weather API and demonstrates how to create and manage API calls, handle errors, and use the BLoC pattern for state management.
- Fetch and display current weather information for a city
- Show weather data, including temperature, humidity, and wind speed
- Error handling for API requests
- BLoC pattern for state management using
flutter_bloc
- Dependency injection using
get_it
- Secure API key storage using
flutter_dotenv
- Clone this repository:
git clone https://github.com/Sadoge/weather.git
- Install the dependencies:
flutter pub get
- Create a
.env
file in the project root and add your Weather API key:
WEATHER_API_KEY=your_api_key_here
- Run the app:
flutter run
- Demo
A live version of the app is available here
- http for API requests
- json_annotation and json_serializable for JSON serialization
- freezed for creating immutable classes
- flutter_bloc for state management
- get_it for dependency injection
- flutter_dotenv for loading environment variables
MIT License. See LICENSE for more information.