A high-performance photo catalog engineered to master complex sliver mechanics, lazy-loading viewports, and multi-tab state preservation in Flutter.
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.
- Engineered a centralized
SliverAppBarcomponent shared across multiple views, eliminating duplicate layout definitions. - Integrates a
QuickActionRowfilter strip directly into the flexible space buffer, maintaining fluid transitions during vertical scrolls.
- Solved viewport clipping by pairing
SliverToBoxAdaptermonth headers with dedicatedSliverGridclusters inside one continuousCustomScrollView. - Eliminates inner scroll contention, ensuring a unified 60 FPS gesture trajectory across the screen.
- 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.
- Drives 4 primary navigation destinations (Pictures, Albums, Stories, Shared) through an
IndexedStackinside Material 3'sNavigationBar. - Tab switching preserves scroll offsets and loaded asset states with zero visual jumping.
- 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 | 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. |
- Flutter SDK (3.x or higher)
- Dart SDK (3.x or higher)
# 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