From bebda29469d1c64b1cec240fffef0c37808ca74a Mon Sep 17 00:00:00 2001 From: Brazol Date: Thu, 12 Mar 2026 14:36:33 +0100 Subject: [PATCH 1/3] fixed the avatar sizes to match figma design --- .../components/badge/stream_badge_count.dart | 1 + .../avatar/stream_avatar_group.dart | 22 +++++++++---------- .../components/badge/stream_badge_count.dart | 3 ++- .../components/stream_badge_count_theme.dart | 6 +++-- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/apps/design_system_gallery/lib/components/badge/stream_badge_count.dart b/apps/design_system_gallery/lib/components/badge/stream_badge_count.dart index cad714e..9220cfd 100644 --- a/apps/design_system_gallery/lib/components/badge/stream_badge_count.dart +++ b/apps/design_system_gallery/lib/components/badge/stream_badge_count.dart @@ -141,6 +141,7 @@ class _SizeDemo extends StatelessWidget { StreamBadgeCountSize.xs => '20px', StreamBadgeCountSize.sm => '24px', StreamBadgeCountSize.md => '32px', + StreamBadgeCountSize.lg => '40px', }; } diff --git a/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart b/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart index bc1d4a0..3373796 100644 --- a/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart +++ b/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart @@ -22,8 +22,7 @@ enum StreamAvatarGroupSize { xl(48), /// Extra-extra large avatar group (80px diameter). - xxl(80) - ; + xxl(80); /// Constructs a [StreamAvatarGroupSize] with the given diameter. const StreamAvatarGroupSize(this.value); @@ -358,20 +357,19 @@ class DefaultStreamAvatarGroup extends StatelessWidget { } // Returns the appropriate avatar size for the given group size. - StreamAvatarSize _avatarSizeForGroupSize( - StreamAvatarGroupSize size, - ) => switch (size) { - .lg => StreamAvatarSize.sm, - .xl => StreamAvatarSize.md, - .xxl => StreamAvatarSize.lg, - }; + StreamAvatarSize _avatarSizeForGroupSize(StreamAvatarGroupSize size) => + switch (size) { + .lg => StreamAvatarSize.sm, + .xl => StreamAvatarSize.md, + .xxl => StreamAvatarSize.xl, + }; // Returns the appropriate badge count size for the given group size. StreamBadgeCountSize _badgeCountSizeForGroupSize( StreamAvatarGroupSize size, ) => switch (size) { - .lg => StreamBadgeCountSize.sm, - .xl => StreamBadgeCountSize.md, - .xxl => StreamBadgeCountSize.md, + .lg => StreamBadgeCountSize.xs, + .xl => StreamBadgeCountSize.sm, + .xxl => StreamBadgeCountSize.lg, }; } diff --git a/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart b/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart index 76bd76c..bc62da4 100644 --- a/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart +++ b/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart @@ -184,7 +184,7 @@ class DefaultStreamBadgeCount extends StatelessWidget { StreamTextTheme textTheme, ) => switch (size) { .xs => textTheme.numericMd, - .sm || .md => textTheme.numericXl, + .sm || .md || .lg => textTheme.numericXl, }; // Returns the appropriate padding for the given badge size. @@ -194,6 +194,7 @@ class DefaultStreamBadgeCount extends StatelessWidget { ) => switch (size) { .xs => .symmetric(horizontal: spacing.xxs), .sm || .md => .symmetric(horizontal: spacing.xs), + .lg => .symmetric(horizontal: spacing.sm), }; } diff --git a/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart b/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart index bba210c..bf5084c 100644 --- a/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart +++ b/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart @@ -21,8 +21,10 @@ enum StreamBadgeCountSize { sm(24), /// Medium badge (32px height). - md(32) - ; + md(32), + + /// Large badge (40px height). + lg(40); /// Constructs a [StreamBadgeCountSize] with the given height. const StreamBadgeCountSize(this.value); From 9cac336df244100df85ca31a62813b55ad3d8be9 Mon Sep 17 00:00:00 2001 From: Brazol Date: Thu, 12 Mar 2026 14:57:22 +0100 Subject: [PATCH 2/3] format fixes --- .../src/components/avatar/stream_avatar_group.dart | 14 +++++++------- .../theme/components/stream_badge_count_theme.dart | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart b/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart index 3373796..9f66a03 100644 --- a/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart +++ b/packages/stream_core_flutter/lib/src/components/avatar/stream_avatar_group.dart @@ -22,7 +22,8 @@ enum StreamAvatarGroupSize { xl(48), /// Extra-extra large avatar group (80px diameter). - xxl(80); + xxl(80) + ; /// Constructs a [StreamAvatarGroupSize] with the given diameter. const StreamAvatarGroupSize(this.value); @@ -357,12 +358,11 @@ class DefaultStreamAvatarGroup extends StatelessWidget { } // Returns the appropriate avatar size for the given group size. - StreamAvatarSize _avatarSizeForGroupSize(StreamAvatarGroupSize size) => - switch (size) { - .lg => StreamAvatarSize.sm, - .xl => StreamAvatarSize.md, - .xxl => StreamAvatarSize.xl, - }; + StreamAvatarSize _avatarSizeForGroupSize(StreamAvatarGroupSize size) => switch (size) { + .lg => StreamAvatarSize.sm, + .xl => StreamAvatarSize.md, + .xxl => StreamAvatarSize.xl, + }; // Returns the appropriate badge count size for the given group size. StreamBadgeCountSize _badgeCountSizeForGroupSize( diff --git a/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart b/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart index bf5084c..2c7f295 100644 --- a/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart +++ b/packages/stream_core_flutter/lib/src/theme/components/stream_badge_count_theme.dart @@ -24,7 +24,8 @@ enum StreamBadgeCountSize { md(32), /// Large badge (40px height). - lg(40); + lg(40) + ; /// Constructs a [StreamBadgeCountSize] with the given height. const StreamBadgeCountSize(this.value); From 5f0e0960eb707dff4a851c0e88257cf1d7fd7ce5 Mon Sep 17 00:00:00 2001 From: Brazol Date: Thu, 12 Mar 2026 17:12:31 +0100 Subject: [PATCH 3/3] updated badge color --- .../lib/src/components/badge/stream_badge_count.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart b/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart index bc62da4..e783f96 100644 --- a/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart +++ b/packages/stream_core_flutter/lib/src/components/badge/stream_badge_count.dart @@ -216,7 +216,7 @@ class _StreamBadgeCountThemeDefaults extends StreamBadgeCountThemeData { StreamBadgeCountSize get size => StreamBadgeCountSize.xs; @override - Color get backgroundColor => _colorScheme.backgroundApp; + Color get backgroundColor => _colorScheme.backgroundElevation3; @override Color get borderColor => _colorScheme.borderSubtle;