actions-test/lib/components/category_chip.dart

17 lines
478 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;
const CategoryChip({super.key, this.category});
@override
Widget build(BuildContext context) {
return ActionChip(
avatar: Icon(Icons.square_rounded, color: category?.color ?? RoomCategory.other(context).color),
label: Text(category?.name ?? RoomCategory.other(context).name),
);
}
}