RadialGradientDto class DTO

Represents a Data transfer object of RadialGradient

This is used to allow for resolvable value tokens, and also the correct merge and combining behavior. It allows to be merged, and resolved to a `RadialGradient

Example usage:

final gradient1 = RadialGradientDto(
center: Alignment.center,
radius: 0.5,
colors: [Colors.red, Colors.blue],
stops: [0.0, 1.0],
);

final gradient2 = RadialGradientDto(
center: Alignment.center,
radius: 0.5,
colors: [Colors.green, Colors.yellow],
stops: [0.0, 1.0],
);

final mergedGradient = gradient1.merge(gradient2);

See also:

Inheritance
Annotations

Constructors

RadialGradientDto({AlignmentGeometry? center, double? radius, TileMode? tileMode, AlignmentGeometry? focal, double? focalRadius, GradientTransform? transform, List<ColorDto>? colors, List<double>? stops})
const

Properties

center AlignmentGeometry?
final
colors List<ColorDto>?
finalinherited
focal AlignmentGeometry?
final
focalRadius double?
final
hashCode int
The hash code for this object.
no setterinherited
props List<Object?>
no setteroverride
radius double?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stops List<double>?
finalinherited
stringify bool
no setterinherited
tileMode TileMode?
final
transform GradientTransform?
finalinherited

Methods

getDiff(Comparable other) Map<String, String>
inherited
merge(covariant RadialGradientDto? other) RadialGradientDto
Merges RadialGradientDto with another other RadialGradientDto
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(MixData mix) RadialGradient
Resolves RadialGradientDto given a MixData into a [RadialGradient
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

from(RadialGradient gradient) RadialGradientDto
Creates a RadialGradientDto from a given RadialGradient.
override
maybeFrom(RadialGradient? gradient) RadialGradientDto?
Creates a RadialGradientDto from a given RadialGradient.
override