17 lines
478 B
Dart
17 lines
478 B
Dart
|
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),
|
||
|
);
|
||
|
}
|
||
|
}
|