Stack overview
| Layer | Technology |
|---|---|
| UI framework | Flutter 3.x, Material 3 |
| State management | flutter_riverpod |
| Navigation | go_router with StatefulShellRoute |
| Local DB | sqflite_sqlcipher (encrypted SQLite) |
| Charts | syncfusion_flutter_charts + fl_chart |
| OCR | google_ml_kit (on-device) |
| Notifications | Native Kotlin + platform channel |
| Auth | Supabase Flutter SDK |
Navigation
The app uses aStatefulShellRoute.indexedStack for the 5 bottom-nav tabs. Each branch has its own GlobalKey<NavigatorState> — tab state is preserved when switching between tabs.
Overlay routes use parentNavigatorKey: _rootNavigatorKey to render on top of the shell (above the bottom nav bar). The AI chat, add/edit screens, and settings are all overlays.
Floating pill navigation
The bottom navigation is a custom floating glass pill — not Flutter’sBottomNavigationBar. It uses BackdropFilter blur, a small mint dot for the active indicator, and HapticFeedback.selectionClick() on each tap.
Riverpod provider graph
Providers are structured in layers. Lower layers feed upper layers — no circular dependencies.Provider patterns
FutureProvider — used for all async data fetches:when() to handle loading/error/data states — no raw null checks or loading booleans in UI code:
Theme system
All colors, typography, and spacing are defined inlib/core/theme/:
Colors — vantage_colors.dart
Typography — vantage_typography.dart
Two font families, never mixed up:
| Font | Usage |
|---|---|
| Inter | All UI text: headings, labels, body, buttons |
| JetBrains Mono | All financial numbers: prices, amounts, percentages, tickers |
Cards vs glass overlays
Standard cards (VantageCard): 12px radius, darkSurface background, subtle shadow. No blur.
Glass overlays (GlassOverlay): BackdropFilter with ImageFilter.blur(sigmaX: 20, sigmaY: 20), semi-transparent background. Used only for the AI chat overlay and modal sheets.
Blur is never applied to content cards — it’s reserved for overlays to maintain visual hierarchy.
Spacing — vantage_spacing.dart
4px base unit:
App lifecycle
VantageApp is a ConsumerStatefulWidget that implements WidgetsBindingObserver:
Agent widget renderer
The AI chat renders native Flutter widgets from JSON responses.widget_renderer.dart maps the type field to a widget:
bar→SfCartesianChartwith bar seriesline→SfCartesianChartwith line seriespie→SfCircularChartsparkline→SparklineChart(custom widget)