Skip to content

Latest commit

 

History

History
385 lines (338 loc) · 19.3 KB

File metadata and controls

385 lines (338 loc) · 19.3 KB

Flutter Weather App - UI Preview

Visual Representation

Since we cannot run the app in this environment, here's a detailed ASCII representation of what the application looks like:


Main Screen - Sunny Weather

┌──────────────────────────────────────────────────────────┐
│  ╔════════════════════════════════════════════════════╗  │
│  ║  Weather                                   ↻       ║  │
│  ╚════════════════════════════════════════════════════╝  │
│                                                          │
│                                                          │
│       ┌────────────────────────────────────┐            │
│       │ ╔════════════════════════════════╗ │            │
│       │ ║                                ║ │            │
│       │ ║            ☀️                  ║ │            │
│       │ ║                                ║ │            │
│       │ ║            23°                 ║ │            │
│       │ ║                                ║ │            │
│       │ ║         Clear sky              ║ │            │
│       │ ║                                ║ │            │
│       │ ║ ──────────────────────────── ║ │            │
│       │ ║                                ║ │            │
│       │ ║   🌬️         💧                ║ │            │
│       │ ║   Wind Speed   Precipitation   ║ │            │
│       │ ║   15.3 km/h    0.0 mm          ║ │            │
│       │ ║                                ║ │            │
│       │ ║ Last updated: Wed, Nov 21 • 2:46 PM  ║       │
│       │ ║ Location: 37.77°, -122.42°    ║ │            │
│       │ ║                                ║ │            │
│       │ ╚════════════════════════════════╝ │            │
│       │   Gradient: Blue → Light Blue     │            │
│       └────────────────────────────────────┘            │
│                                                          │
│              Data from Open-Meteo API                   │
└──────────────────────────────────────────────────────────┘

Main Screen - Rainy Weather

┌──────────────────────────────────────────────────────────┐
│  Weather                                   ↻              │
│                                                          │
│       ┌────────────────────────────────────┐            │
│       │ ╔════════════════════════════════╗ │            │
│       │ ║                                ║ │            │
│       │ ║            🌧️                  ║ │            │
│       │ ║                                ║ │            │
│       │ ║            18°                 ║ │            │
│       │ ║                                ║ │            │
│       │ ║            Rain                ║ │            │
│       │ ║                                ║ │            │
│       │ ║ ──────────────────────────── ║ │            │
│       │ ║                                ║ │            │
│       │ ║   🌬️         💧                ║ │            │
│       │ ║   Wind Speed   Precipitation   ║ │            │
│       │ ║   22.5 km/h    5.2 mm          ║ │            │
│       │ ║                                ║ │            │
│       │ ║ Last updated: Wed, Nov 21 • 2:46 PM  ║       │
│       │ ║ Location: 37.77°, -122.42°    ║ │            │
│       │ ╚════════════════════════════════╝ │            │
│       │   Gradient: Dark Gray → Blue-Gray │            │
│       └────────────────────────────────────┘            │
│                                                          │
│              Data from Open-Meteo API                   │
└──────────────────────────────────────────────────────────┘

Loading State

┌──────────────────────────────────────────────────────────┐
│  Weather                                   ↻              │
│                                                          │
│                                                          │
│       ┌────────────────────────────────────┐            │
│       │ ╔════════════════════════════════╗ │            │
│       │ ║                                ║ │            │
│       │ ║                                ║ │            │
│       │ ║            ⏳                  ║ │            │
│       │ ║      (spinning animation)      ║ │            │
│       │ ║                                ║ │            │
│       │ ║   Loading weather data...      ║ │            │
│       │ ║                                ║ │            │
│       │ ║                                ║ │            │
│       │ ╚════════════════════════════════╝ │            │
│       │   Gradient: Medium Blue            │            │
│       └────────────────────────────────────┘            │
│                                                          │
└──────────────────────────────────────────────────────────┘

Error State

┌──────────────────────────────────────────────────────────┐
│  Weather                                   ↻              │
│                                                          │
│       ┌────────────────────────────────────┐            │
│       │ ╔════════════════════════════════╗ │            │
│       │ ║                                ║ │            │
│       │ ║            ⚠️                  ║ │            │
│       │ ║                                ║ │            │
│       │ ║    Unable to load weather      ║ │            │
│       │ ║                                ║ │            │
│       │ ║  Exception: Network timeout    ║ │            │
│       │ ║                                ║ │            │
│       │ ║        ┌──────────┐           ║ │            │
│       │ ║        │  Retry   │           ║ │            │
│       │ ║        └──────────┘           ║ │            │
│       │ ║                                ║ │            │
│       │ ╚════════════════════════════════╝ │            │
│       │   Gradient: Red → Dark Red         │            │
│       └────────────────────────────────────┘            │
│                                                          │
└──────────────────────────────────────────────────────────┘

Color Schemes by Weather

☀️ Clear Sky

Background Gradient:
  Top:    #4A90E2 (Bright Blue)
  Bottom: #50C9E9 (Light Cyan)
Text: White (#FFFFFF)
Effect: Bright, cheerful, sunny feeling

⛅ Partly Cloudy

Background Gradient:
  Top:    #5B8DB8 (Medium Blue)
  Bottom: #7BA3C7 (Soft Blue)
Text: White (#FFFFFF)
Effect: Calm, pleasant, mild weather

🌧️ Rain

Background Gradient:
  Top:    #4A5F7F (Dark Gray-Blue)
  Bottom: #5B7C99 (Blue-Gray)
Text: White (#FFFFFF)
Effect: Moody, atmospheric, rainy day

❄️ Snow

Background Gradient:
  Top:    #91A8C2 (Light Blue)
  Bottom: #B8C9DA (Very Light Blue)
Text: White (#FFFFFF)
Effect: Cold, crisp, winter atmosphere

⛈️ Thunderstorm

Background Gradient:
  Top:    #2C3E50 (Very Dark Blue-Gray)
  Bottom: #4A5F7F (Dark Blue)
Text: White (#FFFFFF)
Effect: Dramatic, intense, stormy

Typography Hierarchy

┌─────────────────────────────────┐
│                                 │
│  Weather  ← 32px, Weight 600    │
│                                 │
│  ☀️  ← 80px emoji               │
│                                 │
│  23°  ← 72px, Weight 300        │
│                                 │
│  Clear sky  ← 24px, Weight 400  │
│                                 │
│  ────────────────               │
│                                 │
│  Wind Speed  ← 12px, Weight 300 │
│  15.3 km/h  ← 18px, Weight 500  │
│                                 │
│  Last updated: ...              │
│  ← 14px, Weight 300, 80% opacity│
│                                 │
│  Location: 37.77°, -122.42°     │
│  ← 12px, Weight 300, 70% opacity│
│                                 │
└─────────────────────────────────┘

Animation Sequence

Initial Load Animation

Frame 1 (0ms):     Frame 2 (200ms):   Frame 3 (400ms):   Frame 4 (600ms):   Frame 5 (800ms):
┌─────────┐        ┌─────────┐        ┌─────────┐        ┌─────────┐        ┌─────────┐
│         │        │░        │        │░░       │        │░░░      │        │░░░░     │
│         │   →    │░        │   →    │░░       │   →    │░░░      │   →    │░░░░     │
│         │        │░        │        │░░       │        │░░░      │        │░░░░     │
│   ⏳   │        │   ⏳   │        │   ⏳   │        │   ☀️   │        │   ☀️   │
│Loading  │        │Loading  │        │Loading  │        │  23°    │        │  23°    │
│         │        │         │        │         │        │         │        │Clear sky│
└─────────┘        └─────────┘        └─────────┘        └─────────┘        └─────────┘
Opacity: 0%        Opacity: 20%       Opacity: 40%       Opacity: 70%       Opacity: 100%

Refresh Animation

User clicks ↻ button
        ↓
Weather card fades out (200ms)
        ↓
Loading state appears
        ↓
Data fetches (2-3 seconds)
        ↓
New weather card fades in (800ms)

Responsive Layout

Mobile View (< 600px width)

┌──────────────────┐
│  Weather      ↻  │
│                  │
│  ┌────────────┐  │
│  │            │  │
│  │  Weather   │  │
│  │   Card     │  │
│  │  (Full     │  │
│  │   Width)   │  │
│  │            │  │
│  └────────────┘  │
│                  │
│  Open-Meteo API  │
└──────────────────┘

Tablet View (600-1200px width)

┌────────────────────────────────┐
│  Weather                    ↻  │
│                                │
│    ┌──────────────────────┐   │
│    │                      │   │
│    │    Weather Card      │   │
│    │    (Centered)        │   │
│    │                      │   │
│    └──────────────────────┘   │
│                                │
│      Data from Open-Meteo API │
└────────────────────────────────┘

Desktop View (> 1200px width)

┌────────────────────────────────────────────┐
│  Weather                                ↻  │
│                                            │
│         ┌────────────────────┐            │
│         │                    │            │
│         │   Weather Card     │            │
│         │   (Max Width       │            │
│         │    Centered)       │            │
│         │                    │            │
│         └────────────────────┘            │
│                                            │
│          Data from Open-Meteo API         │
└────────────────────────────────────────────┘

Component Breakdown

Header Component

┌────────────────────────────────┐
│  Weather                    ↻  │  ← AppBar (transparent)
│  ↑                          ↑  │
│  Title (32px, white)   Refresh │
│                         Button │
└────────────────────────────────┘

Weather Card Component

┌─────────────────────────────────┐
│  ┌─────────────────────────┐   │
│  │     Weather Icon        │   │  ← 80px emoji
│  │         ☀️              │   │
│  └─────────────────────────┘   │
│                                 │
│  ┌─────────────────────────┐   │
│  │    Temperature          │   │  ← 72px, light weight
│  │         23°             │   │
│  └─────────────────────────┘   │
│                                 │
│  ┌─────────────────────────┐   │
│  │    Description          │   │  ← 24px, regular
│  │     Clear sky           │   │
│  └─────────────────────────┘   │
│                                 │
│  ─────────────────────────────  │  ← Divider
│                                 │
│  ┌─────────────┬─────────────┐ │
│  │  Wind Speed │Precipitation│ │  ← Details grid
│  │  🌬️ 15.3   │  💧 0.0 mm  │ │
│  └─────────────┴─────────────┘ │
│                                 │
│  Last updated: Wed, Nov 21     │  ← Metadata
│  Location: 37.77°, -122.42°    │
└─────────────────────────────────┘

Footer Component

┌────────────────────────────────┐
│  Data from Open-Meteo API      │  ← 12px, semi-transparent
└────────────────────────────────┘

User Interactions

Refresh Button

Normal State:          Hover State:           Pressed:              Loading:
┌─────┐               ┌─────┐                ┌─────┐               ┌─────┐
│  ↻  │     →         │  ↻  │      →         │  ↻  │     →         │  ⏳ │
└─────┘               └─────┘                └─────┘               └─────┘
 White                 Light gray             Dark gray             Spinning
 opacity: 100%         opacity: 80%           opacity: 60%          opacity: 100%

Retry Button (Error State)

Normal State:          Hover State:           Pressed:
┌──────────┐          ┌──────────┐           ┌──────────┐
│  Retry   │    →     │  Retry   │     →     │  Retry   │
└──────────┘          └──────────┘           └──────────┘
White bg              Light shadow           Darker shadow
Red text              Scale 1.05             Scale 0.95

Summary

This UI combines:

  • Clarity: Large, readable text and icons
  • Beauty: Smooth gradients and animations
  • Functionality: All essential weather info at a glance
  • Responsiveness: Adapts to different screen sizes
  • Feedback: Clear loading and error states

The design is inspired by iOS Weather but adds:

  • Dynamic gradients based on weather conditions
  • Larger typography for better readability
  • More detailed information (location coordinates)
  • Linux-native integration (GTK window)

To see it in action: Run flutter run -d linux after setup!