copyWith method

ModelField copyWith({
  1. String? name,
  2. ModelFieldType? type,
  3. bool? isRequired,
  4. bool? isArray,
  5. bool? isReadOnly,
  6. ModelAssociation? association,
  7. List<AuthRule>? authRules,
})

Implementation

ModelField copyWith({
  String? name,
  ModelFieldType? type,
  bool? isRequired,
  bool? isArray,
  bool? isReadOnly,
  ModelAssociation? association,
  List<AuthRule>? authRules,
}) {
  return ModelField(
    name: name ?? this.name,
    type: type ?? this.type,
    isRequired: isRequired ?? this.isRequired,
    isArray: isArray ?? this.isArray,
    isReadOnly: isReadOnly ?? this.isReadOnly,
    association: association ?? this.association,
    authRules: authRules ?? this.authRules,
  );
}