feat(tokens): add design tokens, type scale, push scaffold, and root nav state
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user