import 'package:vid/us/vid_us_unit.dart'; class OutputItem { 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 = ''; } } }