withPathExtension method

GenerationContext withPathExtension(
  1. TypeName typeName
)

Creates a new context with an additional type added to the path

Implementation

GenerationContext withPathExtension(TypeName typeName) {
  return copyWith(path: [...path, typeName]);
}