BodyTransformer class
Annotates method bodies with structured migration hints without rewriting them.
The previous approach used regex substitution which corrupted string literals,
multi-line expressions, and chained calls. This implementation preserves the
original body verbatim and prepends a // TODO(Migrator): comment block
that lists each detected mutation pattern and its Riverpod equivalent.
Developers apply the pattern mechanically; the comment is the contract.
Constructors
Properties
- 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
-
toString(
) → String -
A string representation of this object.
inherited
-
transformBody(
String body, List< FieldInfo> stateFields) → String - Returns the body with a migration hint comment prepended.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited