actions-test/lib/components/category_chip.dart

23 lines
634 B
Dart
Raw Normal View History

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(
2023-12-22 20:14:36 +01:00
avatar: Icon(Icons.square_rounded,
color: category?.color ??
RoomCategory.other(server, room, context).color),
label: Text(
category?.name ?? RoomCategory.other(server, room, context).name),
);
}
}