overlayStyleFor function
System status-bar / nav-bar overlay style for a given scheme.
Light theme → dark icons (visible on cream); dark theme → light icons.
Applied via the AppBar theme AND globally in the MaterialApp builder
(AppBar-less screens get no appBarTheme.systemOverlayStyle).
ICON BRIGHTNESS ONLY — statusBarColor/systemNavigationBarColor are
deliberately NOT set: at targetSdk 36+ Flutter forces edge-to-edge and
both fields are silent no-ops (mobile review fold); setting them would
imply a contract the app cannot keep. On gesture-nav devices the nav
brightness only affects the pill; 3-button nav gets full icon tinting.
Implementation
SystemUiOverlayStyle overlayStyleFor(WalletColors colors) {
final isDark = colors.bg.computeLuminance() < 0.5;
return SystemUiOverlayStyle(
statusBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
statusBarBrightness: isDark ? Brightness.dark : Brightness.light, // iOS
systemNavigationBarIconBrightness: isDark
? Brightness.light
: Brightness.dark,
);
}