ManagedBlock class final
Whose block a PubspecEditor edits: the markers around the entries one
tool owns. Each tool edits only its own block, so several tools — a
plugin that installs packages, just dev link — can manage overrides in
the same file. Each tool defines its own block, and keeps its markers
as projects already hold them.
Constructors
- ManagedBlock(String owner, {String? hint})
-
The block
ownermanages, its start marker sayinghint. The owner is a tool's name — letters, digits,_,.and-(isValid) — and the hint one line; PubspecEditor.parse refuses any other.const
Properties
- end → String
-
The block's last line, after its indent.
no setter
- endPrefix → String
-
What an end marker begins with.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hint → String?
-
What to do instead of editing by hand, shown in the start marker.
final
- isValid → bool
-
Whether owner is a name the markers can carry (letters, digits,
_,.,-) and hint fits on the marker's line.no setter - owner → String
-
Who manages the entries, as the markers name them.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → String
-
The block's first line, after its indent.
no setter
- startPrefix → String
-
What a start marker begins with, whatever its hint says.
no setter
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
Constants
- devLinks → const ManagedBlock
-
just dev link's block: path overrides to local checkouts.