ClassName.fromPath constructor

ClassName.fromPath({
  1. required List<Name> path,
})

Generate class name from hierarchical path

Implementation

factory ClassName.fromPath({required List<Name> path}) {
  return ClassName(name: path.map((e) => e.dartTypeSafe).join(r'$_'));
}