addDartFileEdit abstract method

void addDartFileEdit(
  1. void buildFileEdit(
    1. DartFileEditBuilder builder
    ), {
  2. ImportPrefixGenerator importPrefixGenerator,
  3. String? customPath,
})

Use the buildFileEdit function to create a collection of edits to the currently analyzed file. The edits will be added to the source change that is being built.

The builder passed to the buildFileEdit function has additional support for working with Dart source files.

Use the customPath if the collection of edits should be written to another dart file.

Implementation

void addDartFileEdit(
  void Function(DartFileEditBuilder builder) buildFileEdit, {
  ImportPrefixGenerator importPrefixGenerator,
  String? customPath,
});