-
-
Notifications
You must be signed in to change notification settings - Fork 250
Open
Labels
Description
When the app is launched, the window flashes white before the color from windowManager.setBackgroundColor
is applied.
I found setting then window color in windows/runner/main.cpp fixes this.
On line 36 of main.cpp i added:
// Set the background color of the window flutter grey.shade900 to prevent flash white on startup.
HBRUSH hBrush = CreateSolidBrush(RGB(0x21, 0x21, 0x21));
SetClassLongPtr(window.GetHandle(), GCLP_HBRBACKGROUND, reinterpret_cast<LONG_PTR>(hBrush));
I used chat gpt to generate these two lines so I'm not sure if this is a sensible way of doing it.
oscarkcau