Skip to main content
The HomeScreen is the entry point of the app. It combines a CustomScrollView with a SliverAppBar, an auto-playing MovieSlideshow, five MovieHorizontalListview sections, and a CustomBottomNavigationbar.

Layout structure

The screen is composed of two top-level widgets:
  • Scaffold — wraps the scrollable body and the bottom navigation bar.
  • _HomeView — a ConsumerStatefulWidget that triggers data loading on init and reacts to provider state changes.

CustomScrollView and SliverAppBar

The body uses a CustomScrollView with two slivers:
  1. A floating SliverAppBar that hosts the CustomAppbar widget.
  2. A SliverList with a single child that stacks all content sections vertically.

Loading state

Before any content is rendered, the screen checks intialLoadingProvider. This provider returns true as long as any of the five category lists is still empty. While loading, a FullscreenLoader widget is displayed instead of the scroll view.
The intialLoadingProvider aggregates the state of all five movie providers:
The loader remains visible until all five categories have returned at least one page of results.

Data loading on init

Data loading is triggered inside _HomeViewState.initState(). Each category provider’s loadNextPage() is called once to fetch page 1:
Subsequent pages are loaded lazily as the user scrolls each horizontal list to the end. See Movie Categories for details on how pagination works.

MovieSlideshow

At the top of the content area, MovieSlideshow displays an auto-playing swipeable banner. It receives the first 6 movies from nowPlayingMoviesProvider via movieSlideShowProvider:
The MovieSlideshow widget uses the card_swiper package with autoplay: true, a viewportFraction of 0.8, and dot pagination indicators styled with the active theme colors.

MovieHorizontalListview sections

Below the slideshow, five MovieHorizontalListview instances are stacked. Each receives: Each card in the list shows the movie poster (150×215 px), title, star rating, and popularity score. Tapping a poster navigates to /movie/:id.

CustomBottomNavigationbar

The CustomBottomNavigationbar renders a standard BottomNavigationBar with three items:
The bottom navigation bar is currently a static widget. Tab switching logic has not yet been implemented.