arch-atlas

HomeGridItemData

models/home_grid_item_model.dart

domain

Overview

Lightweight model describing each tile in the home grid: label, routePath, image, optional dark variant, requiresLogin gate, optional rolesAllowed filter and an isNewFeature badge flag.

User Flow

  1. Constructed inline in FirstPage._prestatireItems and _clientItems.
  2. isAllowedFor(role) returns true when rolesAllowed is null or contains the given role.
  3. HomeGridItem widget consumes the data to render image + label and to gate the tap handler.

Cases & Edge Cases

  • rolesAllowed=null is interpreted as 'any role' — not a 'no roles' sentinel.
  • requiresLogin is checked client-side only; deep-linking to the route directly relies on the GoRouter redirect to bounce guests to /login.

Code References

  • lib/src/features/shared/home/models/home_grid_item_model.dart:3 // HomeGridItemData

API Calls

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

Notes

There's no equality override — the items lists are recreated on every build but they're const-ish enough that it doesn't cause widget churn.