Skip to content

About

A Flutter photo gallery app built to master slivers, nested scroll views, and lazy loading — grouped grid feed with a collapsing app bar

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

📸 Flutter Gallery App

Advanced Slivers, Custom Scroll Physics & Multi-Grid Viewport Architecture

Flutter Dart Architecture UI/UX

A high-performance photo catalog engineered to master complex sliver mechanics, lazy-loading viewports, and multi-tab state preservation in Flutter.


📱 App in Action

gallery_app.mp4

Open Video


📌 Architectural Overview

Standard Flutter scroll views often struggle when grouping heterogeneous layouts (collapsing headers, sticky date dividers, and multi-column grids) without causing viewport boundary conflicts.

This project was built to explore low-level sliver composition, coordinating custom scroll physics, dynamic flexible space headers, and memory-efficient lazy loading within a single, cohesive CustomScrollView.


🏛️ Engineering & Layout Highlights

1. 🎛️ Reusable Collapsing App Bar (GalleryAppBar)

  • Engineered a centralized SliverAppBar component shared across multiple views, eliminating duplicate layout definitions.
  • Integrates a QuickActionRow filter strip directly into the flexible space buffer, maintaining fluid transitions during vertical scrolls.

2. 🧩 Complex Nested Grids in a Unified Viewport

  • Solved viewport clipping by pairing SliverToBoxAdapter month headers with dedicated SliverGrid clusters inside one continuous CustomScrollView.
  • Eliminates inner scroll contention, ensuring a unified 60 FPS gesture trajectory across the screen.

3. ⚡ Lazy-Loaded Viewport Allocation

  • All image lists and grids leverage builder delegates (SliverChildBuilderDelegate, SliverList.builder).
  • Memory allocation is strictly bounded to on-screen viewports, preventing out-of-memory spikes when cataloging dense photo libraries.

4. 🗂️ Zero-Reload Tab State Preservation (IndexedStack)

  • Drives 4 primary navigation destinations (Pictures, Albums, Stories, Shared) through an IndexedStack inside Material 3's NavigationBar.
  • Tab switching preserves scroll offsets and loaded asset states with zero visual jumping.

5. 📦 Centralized Data Architecture

  • Decoupled image file paths, album classifications, and metadata into a centralized in-memory data source, keeping hardcoded asset data out of the UI presentation layer.

📱 Screen Breakdown

Screen Layout Engine Purpose & Mechanics
Pictures CustomScrollView + SliverGrid 3-column media grid categorized chronologically under sticky month headers with collapsing flexible headers.
Albums SliverGrid with fixed aspect ratios 2-column album directory engineered with rigid ratio clamping to prevent folder metadata clipping.
Stories Full-width SliverList.builder Magazine-style editorial layout featuring full-width media cards.
Shared Navigation placeholder Target destination for peer-to-peer cloud album sharing streams.

🚀 Getting Started

Prerequisites

  • Flutter SDK (3.x or higher)
  • Dart SDK (3.x or higher)

Installation

# 1. Clone the repository
git clone https://github.com/laibanurr/gallery_app.git

# 2. Navigate to project root
cd gallery_app

# 3. Install dependencies
flutter pub get

# 4. Run the application
flutter run

Engineered by Laiba Nur • Specialized in Flutter, Riverpod & Mobile Architecture

About

A Flutter photo gallery app built to master slivers, nested scroll views, and lazy loading — grouped grid feed with a collapsing app bar

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages