Dark theme detection in Snapped Flutter apps failure

I’m unsure whether this is a snapd bug or a flutter bug or even a bug in my own package - Ubuntu Accomplishments is based on Flutter and uses the Yaru.dart theme, but when snapped the app loses the ability to detect the usage of a Dark Mode. Outside of a snap package the app is able to correctly detect dark mode.

I found that Flutter uses a heuristic mechanism to guess whether a particular GTK theme is dark or light mode based on text colour, which I would guess should work equally well when snapped as unsnapped, but what do I know? :stuck_out_tongue:

Any suggestions as to what I am missing, if I’m missing something obvious, or whether the bug is in Flutter or snapd would be helpful…