Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

802 B
Raw Blame
import 'package:flutter/services.dart';

/// The system bars' style for an app of [brightness]: icons that contrast with it, over the
/// transparent bars `main.dart` draws edge to edge under. The colours are restated because an
/// [AnnotatedRegion]'s style replaces the one set at launch.
SystemUiOverlayStyle systemBarsFor(Brightness brightness) {
  // The icons are the opposite of the app; iOS's `statusBarBrightness` names the GROUND instead.
  final icons = brightness == Brightness.dark
      ? Brightness.light
      : Brightness.dark;
  return SystemUiOverlayStyle(
    statusBarColor: const Color(0x00000000),
    systemNavigationBarColor: const Color(0x00000000),
    statusBarIconBrightness: icons,
    systemNavigationBarIconBrightness: icons,
    statusBarBrightness: brightness,
  );
}