Mix<T extends Attribute> class
Mix Object
Defines a mix
Constructors
- Mix([T? p1, T? p2, T? p3, T? p4, T? p5, T? p6, T? p7, T? p8, T? p9, T? p10, T? p11, T? p12])
-
Instantiate a mix with Attribute parameters
factory
-
Mix.fromList(List<
T> attributes, {List<Variant< variantToApply = const []})T> > -
Instantiate a mix from a List of Attribute instances (cannot be null)
const
-
Mix.fromMaybeList(List<
T?> attributes) -
Instantiate a mix from a List of Attribute instances
(attributes argument can be null)
factory
Properties
-
attributes
→ List<
T> -
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → dynamic
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
variantToApply
→ List<
Variant< T> > -
These are the
Variants
that will be passed toMixContext
in order to be applied for this mixfinal
Methods
-
clone(
) → Mix< T> -
copyWith(
{List< T> attributes = const [], List<Variant< variantToApply = const []}) → Mix<T> >T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
withMaybeVariant(
Variant< T> ? variant) → Mix<T> - Same as withVariant, but the argument is nullable
-
withMaybeVariants(
List< Variant< ? variants) → Mix<T> >T> -
withVariant(
Variant< T> variant) → Mix<T> - Returns a new mix instance from this instance with the Variant instance added
-
withVariants(
List< Variant< variants) → Mix<T> >T> - Same as withVariant, but can accept a List of Variant instances
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
chooser<
T extends Attribute> ({required bool condition, required Mix< T> ifTrue, required Mix<T> ifFalse}) → Mix<T> - Chooses mix based on condition
-
combine<
T extends Attribute> ([Mix< T> ? mix1, Mix<T> ? mix2, Mix<T> ? mix3, Mix<T> ? mix4, Mix<T> ? mix5, Mix<T> ? mix6]) → Mix<T> - Merges many mixes into one
-
combineAll<
T extends Attribute> (List< Mix< mixes) → Mix<T> >T> - Same as combine, but accepts a List of Mix instances
-
variantSwitcher<
T extends Attribute> (Mix< T> mix, Map<bool, Variant< cases) → Mix<T> >T>