IndexGenerator.from constructor

IndexGenerator.from(
  1. ProjectSettings project,
  2. PackageSettings package,
  3. IndexSettings index
)

Implementation

factory IndexGenerator.from(
  ProjectSettings project,
  PackageSettings package,
  IndexSettings index,
) {
  final indexPath = path.join(index.path, '${_resolveIndexName(project, package, index)}.dart');
  return IndexGenerator._(
    project: project,
    package: package,
    index: index,
    folders: index.folders.map((dir) {
      return Directory(path.join(index.path, dir.replaceAll('/', path.separator)));
    }).toList(),
    indexFile: File(indexPath),
  );
}