Skip to content

[Bug] GoogleFonts.noToColorEmoji performance issueย #205

@efalco777

Description

@efalco777

How to reproduce:

  1. Replace initState with in main_custom_font.dart in lib/example of the project with:
@override
  void initState() {
    final fontSize = 24 * (isApple ? 1.2 : 1.0);
    // 1. Define Custom Font & Text Style
    _textStyle = DefaultEmojiTextStyle.copyWith(
      fontFamily: GoogleFonts.notoColorEmoji().fontFamily, // <---- notoColorEmoji instead of notoEmoji
      fontSize: fontSize,
    );

    // 2. Use EmojiTextEditingController
    _controller = EmojiTextEditingController(emojiTextStyle: _textStyle);
    super.initState();
  }
  1. open bottom sheet.

Expected:
App runs same as with other fonts

Actual:
App freezes on scroll, changing emoji tab, emoji picking etc. everythin that may update the sheet causes it to freeze up.

Issue might be related to debug asserts. This functionality is untestable on debug mode. Seems to run ok on profile mode nevermind it also lags, seems to be unrelated to google fonts as i've imported font manually it also simply makes the app unresponsive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions