LCOV - code coverage report
Current view: top level - lib/model/form/component - enum_form_component.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 9 9 100.0 %
Date: 2021-11-15 14:58:17 Functions: 0 0 -

          Line data    Source code
       1             : part of apptive_grid_model;
       2             : 
       3             : /// Model for a [FormComponent] representing [EnumDataEntity]
       4             : class EnumFormComponent extends FormComponent<EnumDataEntity> {
       5             :   /// Creates a FormComponent
       6           1 :   EnumFormComponent({
       7             :     required this.property,
       8             :     required this.data,
       9             :     required this.fieldId,
      10             :     this.options = const FormComponentOptions(),
      11             :     this.required = false,
      12             :   });
      13             : 
      14             :   /// Deserializes [json] into a [FormComponent]
      15           2 :   EnumFormComponent.fromJson(Map<String, dynamic> json, dynamic schema)
      16           2 :       : property = json['property'],
      17           2 :         data = EnumDataEntity(
      18           2 :           value: json['value'],
      19           4 :           options: schema['enum'].cast<String>(),
      20             :         ),
      21           4 :         options = FormComponentOptions.fromJson(json['options']),
      22           2 :         required = json['required'],
      23           2 :         fieldId = json['fieldId'];
      24             : 
      25             :   @override
      26             :   final String property;
      27             :   @override
      28             :   EnumDataEntity data;
      29             :   @override
      30             :   final String fieldId;
      31             :   @override
      32             :   final FormComponentOptions options;
      33             : 
      34             :   @override
      35             :   final bool required;
      36             : }

Generated by: LCOV version 1.15