Auto dark/bright takes a light sensor where the device allows one
/ crosscheck (push) Successful in 1s
CI / Analyze & Test (push) Successful in 21s
CI / Debug APK (push) Successful in 41s

lib/theme/light.dart: dark at 15 lux or less, bright from 60, held 5 s; Settings shows the
reading. The Redmi Pad SE refuses apps its only light sensor (Xiaomi's, from the front
camera), so there Auto keeps following Android's dark theme. DASH-NEXT.md records the
other lux sources.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 22:24:36 +09:00
parent dcafc04cbc
commit 3398da3823
8 changed files with 215 additions and 13 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import 'link/net.dart';
import 'pages/link_test.dart';
import 'shell.dart';
import 'shell_scope.dart';
import 'theme/light.dart';
import 'theme/palette.dart';
/// Override for development, e.g. `--dart-define=YUKART_GW=ws://halogen.local:7700/`.
@@ -18,7 +19,8 @@ const defaultUrl = String.fromEnvironment(
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
final themes = await Themes.load();
final themes = await Themes.load()
..followLight(lightLevels());
final usb = UsbLink();
await usb.bindFor(Uri.parse(defaultUrl));
final boundary = Boundary(defaultUrl)..start();