copyWith method

GenerateDartModel copyWith({
  1. String? className,
  2. Set? fields,
  3. bool? shouldInherit,
  4. String? inheritanceConstructor,
  5. String? keyStringCase,
  6. String? description,
})

Creates a copy of this instance, replacing the specified fields.

Implementation

GenerateDartModel copyWith({
  String? className,
  Set<dynamic>? fields,
  bool? shouldInherit,
  String? inheritanceConstructor,
  String? keyStringCase,
  String? description,
}) {
  return GenerateDartModel.assertRequired(
    className: className ?? this.className,
    fields: fields ?? this.fields,
    shouldInherit: shouldInherit ?? this.shouldInherit,
    inheritanceConstructor:
        inheritanceConstructor ?? this.inheritanceConstructor,
    keyStringCase: keyStringCase ?? this.keyStringCase,
    description: description ?? this.description,
  );
}