Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class _SizeDemo extends StatelessWidget {
StreamBadgeCountSize.xs => '20px',
StreamBadgeCountSize.sm => '24px',
StreamBadgeCountSize.md => '32px',
StreamBadgeCountSize.lg => '40px',
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,20 +358,18 @@ class DefaultStreamAvatarGroup extends StatelessWidget {
}

// Returns the appropriate avatar size for the given group size.
StreamAvatarSize _avatarSizeForGroupSize(
StreamAvatarGroupSize size,
) => switch (size) {
StreamAvatarSize _avatarSizeForGroupSize(StreamAvatarGroupSize size) => switch (size) {
.lg => StreamAvatarSize.sm,
.xl => StreamAvatarSize.md,
.xxl => StreamAvatarSize.lg,
.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,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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),
};
}

Expand All @@ -215,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +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.
Expand Down
Loading