copyWith method

FilePathAnnotation copyWith({
  1. String? text,
  2. FilePath? filePath,
  3. int? startIndex,
  4. int? endIndex,
})

Creates a copy with the given fields replaced.

Implementation

FilePathAnnotation copyWith({
  String? text,
  FilePath? filePath,
  int? startIndex,
  int? endIndex,
}) {
  return FilePathAnnotation(
    text: text ?? this.text,
    filePath: filePath ?? this.filePath,
    startIndex: startIndex ?? this.startIndex,
    endIndex: endIndex ?? this.endIndex,
  );
}