Skip to content

nxtnilesh/flutter_weather_app

Repository files navigation

Weather Forecast App

A Flutter application built for the Flutter Intern Hackathon Challenge. The app lets users search for cities, view real-time weather conditions, explore 5-day and hourly forecasts, and manage favorite locations using local storage.

Features

  • 🔍 City search with type-ahead suggestions, loading indicators, and graceful error handling.
  • ☀️ Current conditions including temperature, feels-like, humidity, wind, status icon, and timestamps.
  • 📅 5-day forecast with min/max temperatures, icons, and friendly day labels.
  • 🕒 Hourly outlook (next 24h) displayed in a horizontal carousel.
  • Favorite cities persisted with shared_preferences, quick access chips, and swipe-to-delete management.
  • 📍 Current location weather using geolocator, with permission handling and fallbacks.
  • 🔄 Unit conversion toggles for °C/°F and km/h/mph, saved between sessions.
  • 🎨 Responsive UI with light/dark themes, animated layout changes, and smooth navigation.

Getting Started

📸 App Screenshots

Home

Search

Search Result

Forecast

Favorites buttons

Favorites cities

Prerequisites

  • Flutter SDK (latest stable) installed and added to your PATH
  • OpenWeatherMap API key (sign up)

Installation

# Clone this repository
git clone https://github.com/nxtnilesh/flutter_weather_app.git
cd weather_app

# (Optional) if project metadata folders are missing, generate them:
flutter create .

# Fetch dependencies
flutter pub get

# Run the app (replace YOUR_KEY)
flutter run --dart-define=OPENWEATHER_API_KEY=YOUR_KEY

Project Structure

lib/
  main.dart

  src/
    app.dart

    config/
      app_router.dart
      app_theme.dart

    controllers/
      weather_controller.dart

    models/
      city.dart
      settings.dart
      weather_models.dart

    screens/
      favorites_screen.dart
      home_screen.dart
      search_screen.dart
      weather_detail_screen.dart

    services/
      favorites_service.dart
      location_service.dart
      settings_service.dart
      weather_service.dart

    utils/
      formatters.dart
      weather_exceptions.dart

    widgets/
      daily_forecast_list.dart
      hourly_forecast_list.dart
      unit_toggle.dart
      weather_scope.dart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors