Auto dark/bright takes a light sensor where the device allows one
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:
+3
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user