Builder mixin

Used to specify whether an Element can be used in other to create complex builder-like statements.

This mixin is especially useful for the generation of complex Dart code with multiple elements instead of using a single Static element with template literals.

const element = Static("'cat' == 'dog'");

Can also be written as:

const element = Literal('cat').equalTo(Literal('dog'));
Superclass Constraints
Mixin Applications

Properties

awaited Builder
Returns this prefixed with await.
no setter
declareConst Builder
Returns this prefixed with const.
no setter
declareFinal Builder
Returns this prefixed with final.
no setter
declareTypedef Builder
Returns this prefixed with typedef.
no setter
declareVar Builder
Returns this prefixed with var.
no setter
hashCode int
The hash code for this object.
no setterinherited
negated Builder
Returns the negated version of this.
no setter
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
returned Builder
Returns this prefixed with return.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spread Builder
Returns this prefixed with the spread operator.
no setter
statement Builder
Returns this as a statement with a suffixed ;.
no setter
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 setter
yielded Builder
Returns this prefixed with yield.
no setter

Methods

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

Operators

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