2023-04-04 20:28:26 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:outbag_app/backend/room.dart';
|
|
|
|
|
|
|
|
class CategoryChip extends StatelessWidget {
|
|
|
|
final RoomCategory? category;
|
|
|
|
|
|
|
|
const CategoryChip({super.key, 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(context).color),
|
2023-04-04 20:28:26 +02:00
|
|
|
label: Text(category?.name ?? RoomCategory.other(context).name),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|