InjectIntoMainDart class final
Injects code into lib/main.dart at the position specified by
placement.
See MainDartPlacement for the three supported anchor points.
Example
InjectIntoMainDart(
placement: MainDartPlacement.afterInit,
code: 'AnalyticsPlugin.boot();',
)
- Inheritance
-
- Object
- InstallOperation
- InjectIntoMainDart
Constructors
- InjectIntoMainDart({required MainDartPlacement placement, required String code})
-
Creates an InjectIntoMainDart operation.
const
Properties
- code → String
-
The code snippet to inject.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- placement → MainDartPlacement
-
Where in
lib/main.dartthe snippet should be inserted.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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