refactor badges
This commit is contained in:
parent
6523420120
commit
8d0eafae8a
5 changed files with 26 additions and 9 deletions
|
|
@ -31,9 +31,8 @@ class AvatarOrHash extends StatelessWidget {
|
|||
child: Center(
|
||||
child: Badge(
|
||||
isLabelVisible: hasBadge,
|
||||
label: SizedBox.shrink(),
|
||||
offset: Offset(8, -8),
|
||||
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||
smallSize: 8,
|
||||
backgroundColor: Theme.of(context).colorScheme.onPrimaryContainer,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4)),
|
||||
child: SizedBox(
|
||||
|
|
|
|||
|
|
@ -60,6 +60,14 @@ class RoomChat extends HookConsumerWidget {
|
|||
.watch(CurrentRoomController.provider)
|
||||
.betterWhen(
|
||||
data: (room) {
|
||||
if (room == null) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"Nothing to see here...",
|
||||
style: theme.textTheme.headlineMedium,
|
||||
),
|
||||
);
|
||||
}
|
||||
final controllerProvider = RoomChatController.provider(
|
||||
room.roomData,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue