actions-test/lib/components/category_chip.dart

22 lines
634 B
Dart

import 'package:flutter/material.dart';
import 'package:outbag_app/backend/room.dart';
class CategoryChip extends StatelessWidget {
final RoomCategory? category;
final String server;
final String room;
const CategoryChip(
{super.key, required this.server, required this.room, this.category});
@override
Widget build(BuildContext context) {
return ActionChip(
avatar: Icon(Icons.square_rounded,
color: category?.color ??
RoomCategory.other(server, room, context).color),
label: Text(
category?.name ?? RoomCategory.other(server, room, context).name),
);
}
}