DependencyVisitor class

Visits root package, transitive and immediate dependencies in order to search given files.

Typical usage is as follows:

 DependencyVisitor(filePaths: ['path to file or file name'])
   .run().listen((dependencyFile) {
     // Do smth with dependencyFile.packageName and dependencyFile.content
   }).onDone(() {
     // Do smth on the end if you need to
 });

Constructors

DependencyVisitor({required List<String> filePaths, List<DependencyType> dependencyTypes = const [DependencyType.development, DependencyType.transitive, DependencyType.direct, DependencyType.root]})
Creates an instance of DependencyVisitor

Properties

dependencyTypes List<DependencyType>
Which dependencies should be consider:
final
filePaths List<String>
Path to file and its name.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run() Stream<DependencyFile>
Search file and read its content.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited