123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- import 'package:vid/us/vid_us_unit.dart';
- class ItemMeta {
-
- String name;
-
- String description;
-
- String briefAnnotation;
-
- String measureType;
-
- List<ItemOutputMeta> outputs;
-
- List<ItemMeta> childItems;
- ItemMeta(
- this.name, {
- required this.measureType,
- required this.description,
- required this.outputs,
- this.briefAnnotation = '',
- this.childItems = const [],
- });
-
- ItemMeta? getChildByName(String name) {
- final matchList = childItems.where((e) => e.name == name);
- if (matchList.isNotEmpty) {
- return matchList.first;
- }
- return null;
- }
- }
- class ItemOutputMeta {
-
- String name;
-
- String description;
-
- VidUsUnit unit;
-
- String? briefAnnotation;
-
- String? additionalAnnotation;
-
- int fractionalDigits;
- ItemOutputMeta(
- this.name,
- this.description,
- this.unit, {
- this.briefAnnotation,
- this.additionalAnnotation,
- this.fractionalDigits = 2,
- });
- }
|