mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-11-21 20:00:49 +01:00
DynamicColorBuilder asked for the wallpaper palette (or the desktop accent) in its first build, so the first frame used the seed scheme and MaterialApp then animated the whole theme for 300 ms into the palette, rebuilding every Theme.of dependent about 18 times during the busiest part of startup. The owner approved building the first frame with the final theme, which removes that launch fade. main now asks once the Activity attaches, alongside the other startup calls, and waits at most 100 ms for the answer before runApp; it is normally in by then. The wrapper builds its first frame with that answer through a provider override; a late answer still applies with the fade, and without a launch request the wrapper asks itself as before. The request keeps DynamicColorBuilder's order and schemes. Every Material launch also ran a second, invisible 300 ms fade: the custom font provider's first answer rebuilt the wrapper, and two builds of the same settings never give equal ThemeData. The wrapper now watches only the font family it reads. Host test with MaterialApp's 300 ms theme animation: the first frame now has the palette, with 1 theme build and 1 Theme.of reader build instead of 2 and 20 over 21 frames; with no dynamic color 1 and 1 instead of 2 and 20. Theme changes after launch still animate.