arch-atlas

Home Page (tab content)

presentation/home_page.dart

presentation

Overview

The 'Home' tab itself — a 2-page PageView showing FirstPage (primary 16-item grid) and SecondPage (secondary grid). Renders the Stories strip above the grid when isLoggedIn, and a compact search CTA below.

User Flow

  1. PageController drives a PageView with [FirstPage, SecondPage].
  2. onPageChanged updates homeCurrentPageIndicatorProvider so the dot indicator follows.
  3. Stories widget appears only for authenticated users.
  4. Tapping the search CTA pushes /search via context.push.

Cases & Edge Cases

  • PageView keeps both pages alive via AutomaticKeepAliveClientMixin on HomePage — switching pages does not refetch stories.
  • Indicator color flips on Theme.brightness — required because the white primary brand color is invisible on the light bg.
  • When commented-out search CTA returns, the tiny icon-only fallback must keep working for users who haven't pulled the new build.

Code References

  • lib/src/features/shared/home/presentation/home_page.dart:17 // HomePage
  • lib/src/features/shared/home/presentation/home_page.dart:49 // PageView.builder
  • lib/src/features/shared/home/presentation/home_page.dart:73 // search CTA

API Calls

Empty — fill this in later. Open the manifest and add content here.

Notes

Large commented-out block at the bottom is the previous full-bar search CTA — kept as design reference, not dead code by accident.