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'));
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
andother
. -
addAssign(
Builder other) → Builder -
Returns the += operator of
this
andother
. -
and(
Builder other) → Builder -
Returns the and operation of
this
andother
. -
as(
Builder other) → Builder -
Returns the as operation of
this
andother
. -
assign(
Builder other) → Builder -
Returns the assign operation of
this
andother
. -
assignCoalescing(
Builder other) → Builder -
Returns the assign coalescing of
this
andother
. -
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
andother
. -
divideAssign(
Builder other) → Builder -
Returns the /= operator of
this
andother
. -
equalTo(
Builder other) → Builder -
Returns the equal to operation of
this
andother
. -
greaterThan(
Builder other, {bool reverse = false}) → Builder -
Returns the greater than operation of
this
andother
. -
greaterThanOrEqualTo(
Builder other, {bool reverse = false}) → Builder -
Returns the greater than or equal to of
this
andother
. -
ifNullThen(
Builder other) → Builder -
Returns the ?? operation of
this
andother
. -
in_(
Builder other) → Builder -
Returns the in operation of
this
andother
. -
index(
Builder other) → Builder -
Returns the index operation on
this
withother
. -
invoke(
[Iterable< Element> ? elements]) → Builder -
Returns the invocation of
this
. -
isA(
Builder other) → Builder -
Returns the is operation of
this
andother
. -
isNotA(
Builder other) → Builder -
Returns the is not operator of
this
andother
. -
modulo(
Builder other) → Builder -
Returns the % operator of
this
andother
. -
multiply(
Builder other) → Builder -
Returns the * operator of
this
andother
. -
multiplyAssign(
Builder other) → Builder -
Returns the *= operator of
this
andother
. -
named(
String name) → Builder -
Returns
this
as a named parameter withname
. -
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
andother
. -
or(
Builder other) → Builder -
Returns the or operator of
this
andother
. -
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
andother
. -
subtractAssign(
Builder other) → Builder -
Returns the -= operator of
this
andother
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited