import 'package:flutter/widgets.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'tokens.dart'; /// Holds the current accent color — the "hero" of Ratune's aesthetic. /// /// In the `dynamic` theme this is extracted from the playing track's album /// art and boosted for readability in OKLab space (Ratune `color.rs:11-64`), /// then interpolated toward over ~400ms. Phase 1 just exposes the default and /// a setter; the extraction + animation land in Phase 2 with playback. class AccentNotifier extends StateNotifier { AccentNotifier() : super(RatuneColors.accentDefault); /// Snap to a new accent (e.g. from album-art extraction). void set(Color color) => state = color; /// Return to the fixed default (e.g. no art / `static` theme). void reset() => state = RatuneColors.accentDefault; } final accentProvider = StateNotifierProvider( (ref) => AccentNotifier(), );