Skip to content

Text Visibility Issue in Release Mode #579

Closed

Description

@tamremariam

I'm experiencing an issue with the flutter_screenutil package in my Flutter application. When running the app in debug mode, everything works as expected. However, upon building and installing the app in release mode, the text becomes invisible when the app is reopened after being closed. The issue appears to be related to the flutter_screenutil package, as removing this package resolves the problem.

Steps to Reproduce:

  1. Integrate the flutter_screenutil package into a Flutter project.
  2. Build the app in debug mode and verify that text is visible and displayed correctly.
  3. Build and install the app in release mode.
  4. Open the app, close it, and then reopen it.
  5. Observe that text is not visible upon reopening.

Expected Behavior:

Text should be visible and properly rendered in release mode, even after reopening the app.

Actual Behavior:

Text is not visible when the app is reopened in release mode.

Environment:

  • Flutter version: 3.23.0-0.1.pre (beta channel)
  • Dart version: 3.5.0
  • DevTools version: 2.36.0
  • flutter_screenutil package version: [Latest version]
  • Operating System: Windows 11
  • Device: Both emulator and physical devices

Additional Notes:

  • The issue does not occur when flutter_screenutil is removed from the project.
  • The problem persists even after cleaning the build cache and reinstalling the app.
    Attachments:

Thank you for your assistance!

Activity

  1. KXwonderful commented on Aug 30, 2024

    @KXwonderful

    I have also encountered a similar problem.How did you solve it later?@tamremariam

  2. tamremariam commented on Aug 31, 2024

    @tamremariam
    Author

    KXwonderful
    i hope this solves your problem @KXwonderful
    Future main() async {
    WidgetsFlutterBinding.ensureInitialized();
    await ScreenUtil.ensureScreenSize(); //add this line this fix fi for me in your main.dar
    runApp(const MyApp());
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions