FlutterTagGradient class

A utility class for creating gradients of various types used in Flutter badges.

Constructors

FlutterTagGradient.linear({AlignmentGeometry? begin = Alignment.centerLeft, AlignmentGeometry? end = Alignment.centerRight, required List<Color> colors, List<double>? stops, TileMode tileMode = TileMode.clamp, GradientTransform? transform})
Constructs a linear gradient.
const
FlutterTagGradient.radial({AlignmentGeometry? center = Alignment.center, required List<Color> colors, double? radius = 0.5, List<double>? stops, TileMode tileMode = TileMode.clamp, AlignmentGeometry? focal, double? focalRadius = 0.0, GradientTransform? transform})
Constructs a radial gradient.
const
FlutterTagGradient.sweep({TileMode tileMode = TileMode.clamp, required List<Color> colors, AlignmentGeometry? center = Alignment.center, double? startAngle = 0.0, double? endAngle = math.pi * 2, List<double>? stops, GradientTransform? transform})
Constructs a sweep gradient.
const

Properties

begin AlignmentGeometry?
The starting alignment of the gradient, only applicable for linear gradients.
final
center AlignmentGeometry?
The center alignment of the gradient, only applicable for radial and sweep gradients.
final
colors List<Color>
A list of colors that define the gradient.
final
end AlignmentGeometry?
The ending alignment of the gradient, only applicable for linear gradients.
final
endAngle double?
The end angle of the gradient, only applicable for sweep gradients.
final
focal AlignmentGeometry?
The focal point of the gradient, only applicable for radial gradients.
final
focalRadius double?
The focal radius for the gradient, only applicable for radial gradients.
final
gradientType FlutterTagGradientType
The type of gradient (linear, radial, or sweep).
final
hashCode int
The hash code for this object.
no setterinherited
radius double?
The radius of the gradient, only applicable for radial gradients.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startAngle double?
The start angle of the gradient, only applicable for sweep gradients.
final
stops List<double>?
Optional list of stops that indicate the color stop positions.
final
tileMode TileMode
Determines how the gradient is tiled when its bounds exceed the gradient's bounds.
final
transform GradientTransform?
Optional transformation to apply to the gradient.
final

Methods

gradient() Gradient
Returns the appropriate Gradient object based on the gradient type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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