Skip to content

[mustache_template] Emoji support #176180

@davidmartos96

Description

@davidmartos96

Steps to reproduce

With mustache_template version 2.0.1, emojis are not currently working.

  1. Render a template with emojis and at least a new line.

Expected results

Non broken result

Actual results

The rendered String is broken because emoji sizes are not taken into consideration

Code sample

Code sample
final source = 'Hello! 🖖👍🏽\nBye! 🏳️‍🌈';
final result = Template(source).renderString(null);
print("Source:");
print(source);
print("------------");
print("Result:");
print(result);

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on Fedora Linux 42 (Workstation Edition) 6.16.8-200.fc42.x86_64, locale en_US.UTF-8) [119ms]
    • Flutter version 3.32.8 on channel stable at /home/david/.local/share/mise/installs/flutter/3.32.8-stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision edada7c56e (9 weeks ago), 2025-07-25 14:08:03 +0000
    • Engine revision ef0cd00091
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,594ms]
    • Android SDK at /home/david/Android/Sdk/
    • Platform android-36, build-tools 35.0.0
    • Java binary at: /home/david/.jdks/jbr-17.0.14/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment JBR-17.0.14+1-1367.22-nomod (build 17.0.14+1-b1367.22)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Chrome - develop for the web [18ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [199ms]
    • clang version 20.1.8 (Fedora 20.1.8-4.fc42)
    • cmake version 3.31.6
    • ninja version 1.12.1
    • pkg-config version 2.3.0
    ! Unable to access driver information using 'eglinfo'.
      It is likely available from your distribution (e.g.: apt install mesa-utils)

[✓] Android Studio (version 2025.1.3) [16ms]
    • Android Studio at /home/david/opt/android-studio/
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • android-studio-dir = /home/david/opt/android-studio/
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)

[✓] VS Code (version unknown) [14ms]
    • VS Code at /usr/share/code
    • Flutter extension version 3.94.0
    ✗ Unable to determine VS Code version.

[✓] Connected device (2 available) [125ms]
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 42 (Workstation Edition) 6.16.8-200.fc42.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 140.0.7339.207

[✓] Network resources [621ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.```

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectp: mustache_templateThe mustache_template packagepackageflutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions