feat(mobile): port desktop color schemes + video viewer overlay (#390)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wes
2026-04-23 11:00:00 -06:00
committed by GitHub
parent 686db1294e
commit 8599a4d2a0
13 changed files with 1209 additions and 128 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart';
@@ -15,10 +16,15 @@ class App extends HookConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final themeMode = ref.watch(themeProvider);
final accentIndex = ref.watch(accentProvider);
final schemeName = ref.watch(schemeProvider);
final authState = ref.watch(authProvider);
final lightScheme = applyAccent(lightColorScheme, accentIndex);
final darkScheme = applyAccent(darkColorScheme, accentIndex);
final resolved = resolveSchemes(schemeName);
final lightScheme = applyAccent(resolved.light, accentIndex);
final darkScheme = applyAccent(resolved.dark, accentIndex);
// When a named scheme is selected it forces light or dark mode;
// otherwise respect the user's ThemeMode preference.
final effectiveMode = resolved.forcedMode ?? themeMode;
// Eagerly initialize websocket session and lifecycle observer when
// authenticated. These providers connect and manage the websocket.
@@ -31,7 +37,7 @@ class App extends HookConsumerWidget {
title: 'Sprout',
theme: AppTheme.light(colorScheme: lightScheme),
darkTheme: AppTheme.dark(colorScheme: darkScheme),
themeMode: themeMode,
themeMode: effectiveMode,
home: authState.when(
loading: () => const _SplashScreen(),
error: (_, _) => const PairingPage(),