From c088772a4b410f8ee97cfa3a733111d08d4824f4 Mon Sep 17 00:00:00 2001 From: Rene Floor Date: Fri, 1 May 2026 15:00:20 +0200 Subject: [PATCH 1/4] export default emoji --- packages/stream_core_flutter/lib/src/components.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_core_flutter/lib/src/components.dart b/packages/stream_core_flutter/lib/src/components.dart index 6b25d11..3696cb6 100644 --- a/packages/stream_core_flutter/lib/src/components.dart +++ b/packages/stream_core_flutter/lib/src/components.dart @@ -1,5 +1,5 @@ export 'components/accessories/stream_audio_waveform.dart'; -export 'components/accessories/stream_emoji.dart' hide DefaultStreamEmoji; +export 'components/accessories/stream_emoji.dart'; export 'components/accessories/stream_file_type_icon.dart' hide DefaultStreamFileTypeIcon; export 'components/avatar/stream_avatar.dart' hide DefaultStreamAvatar; export 'components/avatar/stream_avatar_group.dart' hide DefaultStreamAvatarGroup; From dc113966c0b775a2a20b76d284d10ed9d1c10bc9 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 1 May 2026 15:38:55 +0200 Subject: [PATCH 2/4] feat(ui): pin primary fontFamily to platform's native emoji font --- .../lib/src/components/accessories/stream_emoji.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart b/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart index 17bb1cf..1815741 100644 --- a/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart +++ b/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart @@ -324,6 +324,16 @@ class _UnicodeEmojiWidget extends StatelessWidget { _ => size * _kNotoEmojiScale, }; + // Pin the primary [fontFamily] to the platform's native emoji font so the + // [fontSize] correction above lines up with the font that actually renders + // the glyph. [fontFamilyFallback] still covers cases where the primary + // font is unavailable. + final fontFamily = switch (platform) { + .iOS || .macOS when !kIsWeb => 'Apple Color Emoji', + .windows => 'Segoe UI Emoji', + _ => 'Noto Color Emoji', + }; + // Both fonts produce a [Text] whose layout is larger than the visible glyph — Apple Color // Emoji adds whitespace above, below, and to the right; Noto has similar extra metrics. // See: @@ -351,6 +361,7 @@ class _UnicodeEmojiWidget extends StatelessWidget { ), style: TextStyle( fontSize: fontSize, + fontFamily: fontFamily, decoration: .none, // Commonly available fallback fonts for emoji rendering. fontFamilyFallback: const [ From f9fe389008e5d600cb366026c555780dda7f670e Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 1 May 2026 15:41:53 +0200 Subject: [PATCH 3/4] chore: update CHANGELOG.md --- packages/stream_core_flutter/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/stream_core_flutter/CHANGELOG.md b/packages/stream_core_flutter/CHANGELOG.md index 0dc6f4b..315fb1e 100644 --- a/packages/stream_core_flutter/CHANGELOG.md +++ b/packages/stream_core_flutter/CHANGELOG.md @@ -16,6 +16,7 @@ - `StreamRemoveControl` now meets the 48 dp minimum tap target by default while keeping its 20 dp visible badge anchored to the top-end corner. Exposes `tapTargetSize`, `visualDensity`, and `semanticLabel`, and announces itself as a button to screen readers. - Added `textAlignVertical` to `StreamTextInput` (and `StreamTextInputProps`) for controlling the vertical alignment of the text within the input. - Added `cursorColor`, `cursorErrorColor`, `cursorWidth`, `cursorHeight`, and `cursorRadius` to `StreamTextInputStyle` for customizing the text input cursor. `cursorErrorColor` is applied automatically when `helperState` is `StreamHelperState.error`. `StreamMessageComposerInputField` also honors these cursor properties from the theme. +- Exported `DefaultStreamEmoji` so consumers can compose with or wrap the default emoji rendering when overriding via `StreamComponentFactory`. ### 🐞 Fixed @@ -26,6 +27,7 @@ - Changed `StreamTextInput` default `textCapitalization` to `TextCapitalization.sentences`. - Updated `StreamReactionPicker` spacing to match the Figma specification. - Updated `StreamStepper` button style to match the Figma specification. +- `StreamEmoji` now pins its primary `fontFamily` to the platform's native emoji font (Apple Color Emoji on iOS/macOS, Segoe UI Emoji on Windows, Noto Color Emoji elsewhere) so the existing per-platform `fontSize` correction lines up with the font that actually renders the glyph. `fontFamilyFallback` is unchanged. ### 💥 Breaking Changes From 93fb0c760f5203edc8c8812daf3f2570e4817e35 Mon Sep 17 00:00:00 2001 From: Sahil Kumar Date: Fri, 1 May 2026 15:48:01 +0200 Subject: [PATCH 4/4] feat(ui): adjust fontFamily handling for web platform in stream_emoji.dart --- .../lib/src/components/accessories/stream_emoji.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart b/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart index 1815741..14dce88 100644 --- a/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart +++ b/packages/stream_core_flutter/lib/src/components/accessories/stream_emoji.dart @@ -328,8 +328,13 @@ class _UnicodeEmojiWidget extends StatelessWidget { // [fontSize] correction above lines up with the font that actually renders // the glyph. [fontFamilyFallback] still covers cases where the primary // font is unavailable. + // + // On web, leave [fontFamily] as null and let [fontFamilyFallback] resolve: + // CanvasKit bundles Noto Color Emoji and the HTML renderer defers to the + // browser, so a fixed primary name would lie about what actually renders. final fontFamily = switch (platform) { - .iOS || .macOS when !kIsWeb => 'Apple Color Emoji', + _ when kIsWeb => null, + .iOS || .macOS => 'Apple Color Emoji', .windows => 'Segoe UI Emoji', _ => 'Noto Color Emoji', };