123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import 'package:vid/us/vid_us_unit.dart';
- class OutputItem<T> {
- T value;
- String name;
- VidUsUnit? unit;
- int id;
- late String description;
- late String additionalDescription;
- late String briefDescription;
- OutputItem({
- required this.id,
- required this.value,
- required this.name,
- this.unit,
- String? description,
- String? additionalDescription,
- String? briefDescription,
- }) {
- updateDescription(
- description: description,
- additionalDescription: additionalDescription,
- briefDescription: briefDescription,
- );
- }
- void updateDescription({
- String? description,
- String? additionalDescription,
- String? briefDescription,
- }) {
- if (description != null && description.isNotEmpty) {
- this.description = description;
- this.additionalDescription = additionalDescription ?? '';
- this.briefDescription = briefDescription ?? '';
- } else {
- this.additionalDescription = '';
- this.briefDescription = '';
- }
- }
- }
|