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
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:stream_chat_flutter/src/misc/empty_widget.dart';
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
import 'package:stream_core_flutter/stream_core_flutter.dart';

/// {@template streamUnreadIndicator}
/// Shows different unread counts of the user.
Expand Down Expand Up @@ -31,7 +32,6 @@ class StreamUnreadIndicator extends StatelessWidget {

@override
Widget build(BuildContext context) {
final theme = StreamChatTheme.of(context);
final client = StreamChat.of(context).client;

final stream = switch (_unreadType) {
Expand Down Expand Up @@ -65,16 +65,12 @@ class StreamUnreadIndicator extends StatelessWidget {
builder: (context, unreadCount) {
if (unreadCount == 0) return const Empty();

return Badge(
textColor: Colors.white,
textStyle: theme.textTheme.footnoteBold,
backgroundColor: theme.channelPreviewTheme.unreadCounterColor,
label: Text(
switch (unreadCount) {
> 99 => '99+',
_ => '$unreadCount',
},
),
return StreamBadgeNotification(
size: StreamBadgeNotificationSize.xs,
label: switch (unreadCount) {
> 99 => '99+',
_ => '$unreadCount',
},
);
},
),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading