Skip to content

KarthikeyanS2006/weather_app

Repository files navigation

☁️ Real-Time Weather App

A modern, cross-platform weather application built with Flutter that delivers real-time weather data by leveraging device location and a third-party API.

This project focuses on clean UI design, accurate data fetching, and robust API handling, with full support for web deployment.

✨ Key Features

  • Location-Based Weather: Automatically detects the user's current location to fetch and display accurate local weather.
  • Real-Time Data: Retrieves up-to-the-minute weather conditions, temperature, humidity, wind speed, and more.
  • Dynamic UI: The application interface is designed with a modern aesthetic and features online images and icons that dynamically change based on the current weather condition.
  • Web Support: Fully functional and optimized for deployment as a web application.
  • Cross-Platform Ready: Built with Flutter, making it easily adaptable for Android and iOS mobile platforms.

⚙️ Tech Stack & API

Component Technology Role
Framework Flutter / Dart Frontend development and UI rendering.
Weather Data OpenWeatherMap API Source for current weather data and forecasts.
Location Geolocator Package Handles device location permission and retrieval of coordinates (Latitude/Longitude).
Data Handling http Package Used for making asynchronous GET requests to the OpenWeatherMap API.

screenshot

UI and UX

image

🛠️ Local Setup and Installation

To run this project locally, you must have the Flutter SDK installed and configured.

Prerequisites

  1. Flutter SDK: Ensure you have the latest stable version installed.
  2. OpenWeatherMap API Key:
    • Sign up for a free account at OpenWeatherMap.
    • Generate and obtain your unique API Key (APPID).

Steps to Run

  1. Clone the Repository:

    git clone [https://github.com/KarthikeyanS2006/weather_app.git](https://github.com/KarthikeyanS2006/weather_app.git)
    cd weather_app
  2. Install Dependencies:

    flutter pub get
  3. Set Your API Key (Crucial Step):

    • Find the configuration file where the API key is used (usually in a constants.dart or api_service.dart file).
    • Replace the placeholder with your actual OpenWeatherMap API Key.

    ⚠️ Security Note: Never commit your actual API key directly to a public repository. Use environment variables for production projects.

  4. Run the Application (Web/Mobile):

    • For Web (Desktop testing):
      flutter run -d chrome
    • For Mobile (Emulator/Device):
      flutter run

📍 Location Permissions

The first time you run the app, it will prompt you for location permission. You must grant access for the app to function correctly.

  • Android: Ensure location services are enabled on your emulator/device.
  • Web: The browser will prompt you for location access.

📝 Future Improvements

  • Implement a 5-day / 3-hour Forecast View.
  • Add a City Search feature as an alternative to location detection.
  • Use a State Management solution (like Provider, Riverpod, or Bloc) for better application architecture.
  • Implement a responsive design that adapts seamlessly to all mobile screen sizes.

About

This is the weather application Develop through Flutter and open source Api to fetch date of real time

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors