Method class

Configuration for defining a method.

Inheritance
Mixed in types

Constructors

Method({Reference? returns, String? name, bool isStatic = false, MethodMofifier? modifier, MethodKind? kind, Iterable<Parameter> parameters = const [], Element? body, Iterable<Docs> docs = const [], bool lambda = false, Iterable<Annotation> annotations = const []})
Configuration for defining a method.
const

Properties

annotations Iterable<Annotation>
The annotations of this method.
final
awaited Builder
Returns this prefixed with await.
no setterinherited
body Element?
The body of this method.
final
declareConst Builder
Returns this prefixed with const.
no setterinherited
declareFinal Builder
Returns this prefixed with final.
no setterinherited
declareTypedef Builder
Returns this prefixed with typedef.
no setterinherited
declareVar Builder
Returns this prefixed with var.
no setterinherited
docs Iterable<Docs>
The documentation for this method.
final
hashCode int
The hash code for this object.
no setterinherited
isStatic bool
Whether this method is static.
final
kind MethodKind?
What kind this field is.
final
lambda bool
Whether this is a lambda method.
final
modifier MethodMofifier?
The modifier to apply to this method.
final
name String?
The name of this method.
final
negated Builder
Returns the negated version of this.
no setterinherited
parameters Iterable<Parameter>
The parameters of this method.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
returned Builder
Returns this prefixed with return.
no setterinherited
returns Reference?
The type this method returns.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spread Builder
Returns this prefixed with the spread operator.
no setterinherited
statement Builder
Returns this as a statement with a suffixed ;.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
thrown Builder
Returns this prefixed with throw.
no setterinherited
yielded Builder
Returns this prefixed with yield.
no setterinherited

Methods

add(Builder other) Builder
Returns the + operator of this and other.
inherited
addAssign(Builder other) Builder
Returns the += operator of this and other.
inherited
and(Builder other) Builder
Returns the and operation of this and other.
inherited
as(Builder other) Builder
Returns the as operation of this and other.
inherited
assign(Builder other) Builder
Returns the assign operation of this and other.
inherited
assignCoalescing(Builder other) Builder
Returns the assign coalescing of this and other.
inherited
conditional(Builder isTrue, Builder isFalse) Builder
Returns a conditional based on this.
inherited
declareType(Reference type) Builder
Returns this prefixed with the provided type.
inherited
divide(Builder other) Builder
Returns the / operator of this and other.
inherited
divideAssign(Builder other) Builder
Returns the /= operator of this and other.
inherited
equalTo(Builder other) Builder
Returns the equal to operation of this and other.
inherited
greaterThan(Builder other, {bool reverse = false}) Builder
Returns the greater than operation of this and other.
inherited
greaterThanOrEqualTo(Builder other, {bool reverse = false}) Builder
Returns the greater than or equal to of this and other.
inherited
ifNullThen(Builder other) Builder
Returns the ?? operation of this and other.
inherited
in_(Builder other) Builder
Returns the in operation of this and other.
inherited
index(Builder other) Builder
Returns the index operation on this with other.
inherited
invoke([Iterable<Element>? elements]) Builder
Returns the invocation of this.
inherited
isA(Builder other) Builder
Returns the is operation of this and other.
inherited
isNotA(Builder other) Builder
Returns the is not operator of this and other.
inherited
modulo(Builder other) Builder
Returns the % operator of this and other.
inherited
multiply(Builder other) Builder
Returns the * operator of this and other.
inherited
multiplyAssign(Builder other) Builder
Returns the *= operator of this and other.
inherited
named(String name) Builder
Returns this as a named parameter with name.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notEqualTo(Builder other) Builder
Returns the not equal to operator of this and other.
inherited
or(Builder other) Builder
Returns the or operator of this and other.
inherited
property(String name, {bool isNullSafe = false}) Builder
Returns the name property of this.
inherited
propertyAssert(String name) Builder
Returns the name property of this asserted.
inherited
propertyCascade(String name) Builder
Returns the name property of this as cascade.
inherited
propetyConditional(String name) Builder
Returns the name property of this conditionally.
inherited
subtract(Builder other) Builder
Returns the - operator of this and other.
inherited
subtractAssign(Builder other) Builder
Returns the -= operator of this and other.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited