copyWith method

FileSearchCustomMetadata copyWith({
  1. String? key,
  2. Object? stringValue = unsetCopyWithValue,
  3. Object? numericValue = unsetCopyWithValue,
  4. Object? stringListValue = unsetCopyWithValue,
})

Creates a copy with replaced values.

Implementation

FileSearchCustomMetadata copyWith({
  String? key,
  Object? stringValue = unsetCopyWithValue,
  Object? numericValue = unsetCopyWithValue,
  Object? stringListValue = unsetCopyWithValue,
}) {
  return FileSearchCustomMetadata(
    key: key ?? this.key,
    stringValue: stringValue == unsetCopyWithValue
        ? this.stringValue
        : stringValue as String?,
    numericValue: numericValue == unsetCopyWithValue
        ? this.numericValue
        : numericValue as double?,
    stringListValue: stringListValue == unsetCopyWithValue
        ? this.stringListValue
        : stringListValue as List<String>?,
  );
}