copyWith method

GeneratorOptions copyWith({
  1. bool? generateHelpers,
  2. bool? generateQueries,
  3. List<ScalarMap?>? scalarMapping,
  4. String? fragmentsGlob,
  5. List<SchemaMap>? schemaMapping,
  6. List<String>? ignoreForFile,
  7. bool? convertEnumToString,
})

Creates a copy of this GeneratorOptions but with the given fields replaced with the new values.

Implementation

GeneratorOptions copyWith({
  bool? generateHelpers,
  bool? generateQueries,
  List<ScalarMap?>? scalarMapping,
  String? fragmentsGlob,
  List<SchemaMap>? schemaMapping,
  List<String>? ignoreForFile,
  bool? convertEnumToString,
}) {
  return GeneratorOptions(
    generateHelpers: generateHelpers ?? this.generateHelpers,
    generateQueries: generateQueries ?? this.generateQueries,
    scalarMapping: scalarMapping ?? this.scalarMapping,
    fragmentsGlob: fragmentsGlob ?? this.fragmentsGlob,
    schemaMapping: schemaMapping ?? this.schemaMapping,
    ignoreForFile: ignoreForFile ?? this.ignoreForFile,
    convertEnumToString: convertEnumToString ?? this.convertEnumToString,
  );
}