MacroMath UI
Components · App

App Tour (coach-marks)

First-run tutorial that highlights each navigation tab.

App · Flutter · macromath_mobile

First-run tutorial. It dims the screen and "cuts out" a spotlight over the bottom-bar tab being explained, with a descriptive card. It steps through the tabs — Home → Diet → Pantry → MacroAI → Profile — switching the screen behind so the user sees each area. No external dependencies.

Steps

StepTabSpotlight
WelcomeHomeCentered card (no spotlight).
HomeHomeSpotlight on tab 0.
DietDietSpotlight on tab 1.
PantryPantrySpotlight on tab 2.
MacroAIAISpotlight on tab 3.
ProfileProfileSpotlight on tab 4.

Properties

PropertyTypeDescription
onSwitchTabValueChanged<int>Switches the tab behind during the tour.
onFinishVoidCallbackCalled on finish or skip.

Usage

Mounted on the MainShell, above the scaffold, on the first session:

Stack(
  children: [
    scaffold,
    if (showTour)
      AppTour(
        onSwitchTab: switchTo,
        onFinish: _finishTour,
      ),
  ],
);

The user can skip the tour at any step. It is marked as done so it won't appear again.

On this page