Skip to content

Text is not showing in release mode #593

Open
@ShafiMunshi

Description

@ShafiMunshi

For getting adaptive text by depending on screen size, I used (.sp) in TextStyle in TextTheme. Using (.sp) inside text theme data , app works fine. But the issue occured when I tried to run it in release or profile mode. No text were showing in screen. Then i had to refine the textheme and remove all the (.sp).

From

  static TextTheme lightTextTheme = TextTheme(
    displayLarge: TextStyle(
      fontSize: 30.sp, 
      fontWeight: FontWeight.w600,
      color: AppColors.black, 
    ),
    displayMedium: TextStyle(
      fontWeight: FontWeight.w500, 
      fontSize: 25.sp, 
      color: AppColors.secondaryColor, 
    ),

To

  static TextTheme lightTextTheme = TextTheme(
    displayLarge: TextStyle(
      fontSize: 30, 
      fontWeight: FontWeight.w600, 
      color: AppColors.black, 
    ),
    displayMedium: TextStyle(
      fontWeight: FontWeight.w500,
      fontSize: 25, 
      color: AppColors.secondaryColor, 
    ), 

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