insertIntoUnitMember abstract method
void
insertIntoUnitMember(
- CompilationUnitMember compilationUnitMember,
- void buildEdit(
- DartEditBuilder builder
- bool lastMemberFilter(
- ClassMember existingMember
Inserts into a CompilationUnitMember
.
The new member is inserted at an offset determined by lastMemberFilter
.
If lastMemberFilter
is omitted, the new member is inserted after all
existing members.
Otherwise, the offset is just after the last member of
compilationUnitMember
that matches lastMemberFilter
. If no existing
member matches, then the offset is at the beginning of
compilationUnitMember
, just after it's opening brace.
Implementation
void insertIntoUnitMember(
CompilationUnitMember compilationUnitMember,
void Function(DartEditBuilder builder) buildEdit, {
bool Function(ClassMember existingMember)? lastMemberFilter,
});