ControlBase.fromJson constructor

ControlBase.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ControlBase.fromJson(Map<String, dynamic> json) {
  final type = json['controlType'];

  return ControlBase(
      json['name'],
      type,
      json['required'],
      json.containsKey('flags')
          ? (json['flags'] as Iterable<dynamic>)
              .map((e) => e as String)
              .toList()
          : null,
      json);
}