mirror of
https://github.com/block/buzz.git
synced 2026-10-27 04:30:52 +00:00
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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user