OverridesTarget class final
Where a tool writes dependency_overrides.
While pubspec_overrides.yaml exists, pub ignores the
dependency_overrides in pubspec.yaml completely, so a tool must
write to the file pub actually reads (active). When that file is
ignored by git (as in the templates), a clone wouldn't have it, so the
same block is also written into pubspec.yaml (mirror): inert here,
effective everywhere else.
Constructors
- OverridesTarget(String active, {String? mirror})
-
Overrides go to
active, and also tomirrorwhen set.const
Properties
- active → String
-
The file pub reads overrides from.
final
-
files
→ List<
String> -
Both files, active first.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- mirror → String?
-
The committed file that also gets them, when active isn't committed.
final
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
detect(
JustProject project) → Future< OverridesTarget> -
Works out the target for
project. -
isGitIgnored(
JustProject project, String relative) → Future< bool> -
Whether git ignores
relativeinproject: asks git, and reads.gitignorewhen git isn't available.