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
{{ message }}
Repository navigation
App crashes in release mode when ScreenUtilInit(Size(MediaQuery.of(context).size.width, MediaQuery.of(context).size.height)) #586
App crashes in release mode when ScreenUtilInit(Size(MediaQuery.of(context).size.width, MediaQuery.of(context).size.height)) is used and scrolling a list of items but works fine if static size values or given: designSize: const Size(360, 690)
The reason for choosing a static design size for ScreenUtilInit is to ensure consistent scaling calculations across different screen sizes.
When using dynamic size values, such as Size(MediaQuery.of(context).size.width, MediaQuery.of(context).size.height), it can lead to inconsistencies during the build process, especially in release mode.This is because the dynamic values can change based on the device's screen size, causing unexpected behavior and potential crashes.
Activity
DeepeshKalura commentedon Nov 14, 2024
The reason for choosing a static design size for
ScreenUtilInitis to ensure consistent scaling calculations across different screen sizes.When using dynamic size values, such as
Size(MediaQuery.of(context).size.width, MediaQuery.of(context).size.height), it can lead to inconsistencies during the build process, especially in release mode.This is because the dynamic values can change based on the device's screen size, causing unexpected behavior and potential crashes.