You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2.3.0 Introduce changes in #7 , which provides ability for app for Windows to react with system accent color changes.
It should be an awesome updates, but, a mistake was made there. As per #28 mentioned, while trying to stream the accent color, cause LateInitializationError.
Beyond that, it actually break release build of other platform (At least Web and Android are breaking). For debug build, it works fine with console error, but all things works. However, in a release build,
this error can break the whole initialization phase and result a blank app without anything. It also makes web build hang up and finally being marked as no respond.
The variable accentColor should be evaluate immediately, and it actually means SystemTheme.accentColor, which is still initializing. Then cause LateInitializationError.
Here's my current investigation report. I'm not sure why it will make web build no respond as it should be failed or crash at start time, there may be other deeper issue.
The text was updated successfully, but these errors were encountered:
I have tested system_theme example at flutter 3.10.6
on platform
1 .Chrome fail ( show Error: LateInitializationError: accentColor) but shown unexpected result
2. windows Success
3. Android fail show Error: LateInitializationError: accentColor)
4. Linux fail ( pause on exception)
2.3.0
Introduce changes in #7 , which provides ability for app for Windows to react with system accent color changes.It should be an awesome updates, but, a mistake was made there. As per #28 mentioned, while trying to stream the accent color, cause
LateInitializationError
.Beyond that, it actually break release build of other platform (At least
Web
andAndroid
are breaking). For debug build, it works fine with console error, but all things works. However, in a release build,this error can break the whole initialization phase and result a blank app without anything. It also makes web build hang up and finally being marked as no respond.
If I understand correctly:
system_theme/lib/system_theme.dart
Lines 59 to 60 in 126cd20
Here, try to initialize final variable
SystemTheme.accentColor
withSystemAccentColor(fallbackColor)..load()
. During theload()
,system_theme/lib/system_theme.dart
Lines 137 to 149 in 126cd20
SystemTheme.onChange
getter was called, and itreturn Stream.value(accentColor)
on platform other than Windows.system_theme/lib/system_theme.dart
Lines 74 to 80 in 126cd20
The variable
accentColor
should be evaluate immediately, and it actually meansSystemTheme.accentColor
, which is still initializing. Then causeLateInitializationError
.Here's my current investigation report. I'm not sure why it will make web build no respond as it should be failed or crash at start time, there may be other deeper issue.
The text was updated successfully, but these errors were encountered: