feat(tokens): add design tokens, type scale, push scaffold, and root nav state

This commit is contained in:
2026-07-28 20:01:23 +02:00
parent 6dba89432e
commit 172b2a42ac
17 changed files with 856 additions and 30 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/foundation.dart';
/// The five root tabs, in their declared (and displayed) order. Declaration
/// order IS the tab order — the single source shared by `_paginas` and
/// `_navItems` in app.dart (Design ADR-8).
enum RaizPluriWave { escuchar, buscar, favoritos, alarmas, ajustes }
/// Root-to-root navigation state (Design ADR-8). The single source of truth
/// for which of the 5 root tabs is active. Switching roots is a plain
/// notifier update — it never pushes a route.
class EstadoNavegacionRaiz extends ChangeNotifier {
RaizPluriWave _actual = RaizPluriWave.escuchar;
RaizPluriWave get actual => _actual;
/// Declaration order doubles as the bottom-nav index.
int get indice => _actual.index;
void irA(RaizPluriWave raiz) {
if (raiz == _actual) return;
_actual = raiz;
notifyListeners();
}
}