Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes in release mode when ScreenUtilInit(Size(MediaQuery.of(context).size.width, MediaQuery.of(context).size.height)) #586

Open
qamarkhan1 opened this issue Oct 9, 2024 · 1 comment

Comments

@qamarkhan1
Copy link

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)

@DeepeshKalura
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants