RSS Archive About

Status bar icons that read the room

You might've used Flutter's AnnotatedRegion to change the navigation bar color or the status bar icon color for a whole screen or the whole app. Wrap the widget, pass a SystemUiOverlayStyle, done.

What's less known is that it doesn't have to be the whole screen. You can annotate specific widgets, and Flutter will pick the style of whatever is currently under the status bar (and the navigation bar on Android). Scroll a dark widget under it and the icons go light, scroll a light one and they go dark. No listeners, no scroll offsets:

Status bar icons switching between light and dark while black and white list items scroll underneath

Here's a list of black and white items, each annotated with its own style:

const _onDark = SystemUiOverlayStyle(
  statusBarColor: Colors.transparent,
  statusBarIconBrightness: Brightness.light, // Android
  statusBarBrightness: Brightness.dark, // iOS
  systemNavigationBarColor: Colors.transparent,
  systemNavigationBarIconBrightness: Brightness.light,
);

const _onLight = SystemUiOverlayStyle(
  statusBarColor: Colors.transparent,
  statusBarIconBrightness: Brightness.dark,
  statusBarBrightness: Brightness.light,
  systemNavigationBarColor: Colors.transparent,
  systemNavigationBarIconBrightness: Brightness.dark,
);

ListView.builder(
  itemCount: 10,
  itemBuilder: (context, index) {
    final isDark = index.isEven;
    return AnnotatedRegion<SystemUiOverlayStyle>(
      value: isDark ? _onDark : _onLight,
      child: Container(
        height: 300,
        color: isDark ? Colors.black : Colors.white,
      ),
    );
  },
);

That's it. On every frame Flutter looks up the annotated region at the top of the screen and at the bottom, and applies the style it finds there.

Neat!

Notes

  • An AppBar adds its own AnnotatedRegion, so if it sits under the status bar it wins.
  • statusBarBrightness (iOS) means the brightness of the background, not the icons, so it's the opposite of statusBarIconBrightness.
  • Transparent bars only make sense when the app draws edge-to-edge, otherwise there's nothing under them to react to.

Menu bar squatters

What's the deal with the apps that register themselves in the Mac menu bar uninvited?

Most already have a full-sized Dock icon with a dot underneath to indicate that they're running. Why do they have to be somewhere else? These menus are often useless:

Pumble's menu bar item whose only option is 'Exit Pumble'

Sorry buddies, it's either the menu bar or the Dock. You can't be in both. Good thing macOS lets you turn these little buggers off in System Settings > Menu Bar > Allow in the Menu Bar:

macOS 'Allow in the Menu Bar' settings with menu bar items turned off for most apps

I lost a friend to AI

You know how all relationships have this sweet phase where you’re consumed by each other and don’t spot any issues in one another? A friend of mine has been in that phase with AI for way too long. There’s nothing romantic about their relationship with AI, it’s just they delegate everything to it, AI has become their entire personality.

We have a side project together with a decent number of users. Every issue, every pull request description and every pull request comment’s response is written by AI with that stupid AI way of mimicking how aCtuAl pEoPle talk. It’s hard to get through to the human part but when you manage to do so, there’s only AI on their mind. They always say “let’s ask AI” like an LLM is an oracle that is always right. There’s no more joy in our collaboration, might as well let my agent deal with their agent and let the agents talk to each other without humans involved.

They would do things they have zero knowledge about and think they’re an expert. AI is great for helping you do things you don’t know much about but being able to do anything doesn’t automatically make you an expert in such thing (I call it LLM powered Dunning-Kruger).

It’s sad to see how some people willingly give up their seats to become human vessels for an AI personality.