This is a Flutter project that showcases a beautiful weather user interface (UI) using the BLoC (Business Logic Component) architecture and data from the OpenWeather API. Whether you're a Flutter developer looking to learn more about BLoC or just want to create a stunning weather app, this project provides a great starting point.
- Beautiful and user-friendly weather UI.
- Real-time weather data retrieved from the OpenWeather API.
- BLoC architecture for state management.
- Clean and well-organized project structure.
- City search to view weather for different locations.
To run this project, make sure you have the following software installed on your development machine:
- Flutter: You can find installation instructions here.
- Dart: Included with the Flutter installation.
- IDE of your choice (e.g., Android Studio, Visual Studio Code).
- Clone this repository to your local machine:
git clone https://github.com/carpetbhaiya/WeatherUI.git- Navigate to the project directory:
cd weather-ui-flutter- Install the project dependencies:
flutter pub getTo fetch weather data, you'll need an API key from OpenWeather. Follow these steps to configure the API:
-
Sign up for an OpenWeather account or log in if you already have one.
-
Generate an API key in your OpenWeather account.
-
Copy the API key to your clipboard.
-
Paste it in a file named
my_data.dartinside thelib/datadirectory and add the following code:
String API_KEY = "YOUR_OPENWEATHER_API_KEY"Replace 'YOUR_OPENWEATHER_API_KEY' with your actual API key.
You can run the app on a simulator or a physical device. Use the following commands:
- To run the app in Android Emulator or device:
flutter run