FVariants<K extends FVariantConstraint, E extends FVariant, V, D extends Delta> class
Maps variant constraints to values.
See also:
- FVariantConstraint which represents a combination of variants under which a widget is styled differently.
- Implemented types
-
- FVariantsDelta<
K, E, V, D> - FVariantsValueDelta<
K, E, V, D>
- FVariantsDelta<
- Mixed-in types
- Implementers
Constructors
-
FVariants(V base, {required Map<
List< variants})K> , V> - Creates an FVariants with concrete variants.
- FVariants.all(V base)
-
Creates an FVariants with only a base variant.
const
-
FVariants.from(V base, {required Map<
List< variants})K> , D> -
Creates an FVariants with variants derived from deltas applied to
base. -
FVariants.raw(V base, Map<
K, V> variants) -
Creates an FVariants with raw variants.
const
Properties
Methods
-
apply(
List< FVariantOperation< operations) → FVariants<K, E, V, D> >K, E, V, D> -
Applies a sequence of delta-based
operationsto this FVariants. -
applyValues(
List< FVariantValueDeltaOperation< operations) → FVariants<K, E, V, D> >K, E, V, D> -
Applies a sequence of value-based
operationsto this FVariants. -
call(
covariant FVariants< K, E, V, D> _) → FVariants<K, E, V, D> -
Applies this delta to the given value.
override
-
cast<
T1 extends FVariantConstraint, T2 extends FVariant> () → FVariants< T1, T2, V, D> -
Returns a new FVariants with the variant type parameters cast to
T1andT2. -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
Set< FVariant> variants) → V - Returns most specific matching variant, or base if no constraints match.
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
lerpBoxDecoration<
K extends FVariantConstraint, E extends FVariant, D extends Delta> (FVariants< K, E, BoxDecoration, D> a, FVariants<K, E, BoxDecoration, D> b, double t) → FVariants<K, E, BoxDecoration, D> - Linearly interpolates between two FVariants containing BoxDecorations.
-
lerpColor<
K extends FVariantConstraint, E extends FVariant, D extends Delta> (FVariants< K, E, Color, D> a, FVariants<K, E, Color, D> b, double t) → FVariants<K, E, Color, D> - Linearly interpolates between two FVariants containing Colors.
-
lerpDecoration<
K extends FVariantConstraint, E extends FVariant, D extends Delta> (FVariants< K, E, Decoration, D> a, FVariants<K, E, Decoration, D> b, double t) → FVariants<K, E, Decoration, D> - Linearly interpolates between two FVariants containing Decorations.
-
lerpIconThemeData<
K extends FVariantConstraint, E extends FVariant, D extends Delta> (FVariants< K, E, IconThemeData, D> a, FVariants<K, E, IconThemeData, D> b, double t) → FVariants<K, E, IconThemeData, D> - Linearly interpolates between two FVariants containing IconThemeDatas.
-
lerpTextStyle<
K extends FVariantConstraint, E extends FVariant, D extends Delta> (FVariants< K, E, TextStyle, D> a, FVariants<K, E, TextStyle, D> b, double t) → FVariants<K, E, TextStyle, D> - Linearly interpolates between two FVariants containing TextStyles.
-
lerpWhere<
K extends FVariantConstraint, E extends FVariant, V, D extends Delta> (FVariants< K, E, V, D> a, FVariants<K, E, V, D> b, double t, V? lerp(V?, V?, double)) → FVariants<K, E, V, D> -
Linearly interpolates between two FVariants using the given
lerpfunction. -
lerpWhereUsing<
T extends FVariants< (K, E, V, D> , K extends FVariantConstraint, E extends FVariant, V, D extends Delta>FVariants< K, E, V, D> a, FVariants<K, E, V, D> b, double t, V? lerp(V?, V?, double), T supply(V base, Map<K, V> variants)) → T -
Linearly interpolates between two
Tusing the givenlerpandsupplyfunction.