copyWith method

GenerateDartModel copyWith({
  1. String? className,
  2. Set? fields,
  3. bool? shouldInherit,
  4. String? inheritanceConstructor,
  5. String? keyStringCase,
  6. String? description,
  7. String? tableName,
  8. String? schema,
  9. List<Map<String, dynamic>>? indexes,
})

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,
  String? tableName,
  String? schema,
  List<Map<String, dynamic>>? indexes,
}) {
  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,
    tableName: tableName ?? this.tableName,
    schema: schema ?? this.schema,
    indexes: indexes ?? this.indexes,
  );
}