5cd21c8adf
Similarily to categories and rooms, the edit product screen is reused as a new-room screen, which is especially easy, because the user is unable to select the product id themselves. NOTE: the dynamic value-unit input is still missing some "subunits" The view product screen has links to the edit product page, the view parent page (if available) and a not yet functional view children screen. NOTE: The parent product display should be restricted in width, and the screen is missing value/unit information.
16 lines
478 B
Dart
16 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),
|
|
);
|
|
}
|
|
}
|