CodeMethod class
A method declaration inside a class.
- Annotations
-
- @immutable
Constructors
-
CodeMethod({required String name, required String returnType, List<
CodeParameter> parameters = const <CodeParameter>[], List<String> bodyLines = const <String>[], bool isAsync = false}) -
Creates a method node.
const
Properties
-
bodyLines
→ List<
String> -
Raw body source lines — each is indented by the renderer.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAsync → bool
-
Whether the method carries an
asyncmodifier.final - name → String
-
Method name.
final
-
parameters
→ List<
CodeParameter> -
Formal parameter list.
final
- returnType → String
-
Return type string, e.g.
'void','Set<String>'.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