AddDependency class final
Adds a package dependency to pubspec.yaml.
When isDev is true the dependency is placed under dev_dependencies
instead of dependencies.
Example
AddDependency(name: 'firebase_core', version: '^3.0.0')
AddDependency(name: 'build_runner', version: '^2.4.0', isDev: true)
- Inheritance
-
- Object
- InstallOperation
- AddDependency
Constructors
- AddDependency({required String name, required String version, bool isDev = false})
-
Creates an AddDependency operation.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDev → bool
-
When
true, the dependency is added todev_dependencies.final - name → String
-
The package name as it appears on pub.dev.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- version → String
-
The version constraint to write (e.g.
'^1.0.0','any').final
Methods
-
describe(
) → String -
Returns a human-readable dry-run line for this operation.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited