ClassModel constructor

const ClassModel(
  1. String key, {
  2. required Iterable<FieldModel> fields,
  3. String? dartName,
  4. String? doc,
  5. String? reference,
  6. bool? staticKeys,
  7. bool? toJson,
  8. bool? convert,
  9. Iterable<InstanceModel>? instances,
})

The model to contain a model.

Implementation

const ClassModel(
  this.key, {
  required this.fields,
  final String? dartName,
  this.doc,
  final String? reference,
  final bool? staticKeys,
  final bool? toJson,
  final bool? convert,
  final Iterable<InstanceModel>? instances,
})  : assert(key != '', 'Key can not be empty'),
      dartName = dartName ?? '',
      reference = reference ?? '',
      staticKeys = staticKeys ?? true,
      toJson = toJson ?? true,
      convert = convert ?? true,
      instances = instances ?? const Iterable<InstanceModel>.empty();