copyWith method

Module copyWith(
  1. Map<String, dynamic> data
)

Implementation

Module copyWith(Map<String, dynamic> data) {
  return Module(
    name: data['name'] ?? name,
    fields:
        data['fields'] != null && data['fields'] is List
            ? List<Field>.from(data['fields'].map<Field>((field) => Field.fromDynamic(field)))
            : fields,
  );
}