Gradient class Null safety
- Implementers
- Annotations
-
- @freezed
Constructors
-
Gradient.fromJson(Map<
String, Object?> json) -
factory
-
Gradient.linear({@Default(Alignment.centerLeft) Alignment begin, @Default(Alignment.centerRight) Alignment end, required List<
Color> colors, List<double> ? stops, @Default(TileMode.clamp) TileMode tileMode, GradientTransform? transform}) -
constfactory
-
Gradient.radial({@Default(Alignment.center) Alignment center, @Default(0.5) double radius, required List<
Color> colors, List<double> ? stops, @Default(TileMode.clamp) TileMode tileMode, Alignment? focal, @Default(0.0) double focalRadius, GradientTransform? transform}) -
constfactory
-
Gradient.sweep({@Default(Alignment.center) Alignment center, @Default(0.0) double startAngle, @Default(pi * 2) double endAngle, required List<
Color> colors, List<double> ? stops, @Default(TileMode.clamp) TileMode tileMode, GradientTransform? transform}) -
constfactory
Properties
-
colors
→ List<
Color> -
read-only, inherited
-
copyWith
→ $GradientCopyWith<
Gradient> -
@JsonKey(ignore: true), read-only, inherited
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
-
stops
→ List<
double> ? -
read-only, inherited
- tileMode → TileMode
-
read-only, inherited
- transform → GradientTransform?
-
read-only, inherited
Methods
-
map<
TResult extends Object?> ({required TResult linear(LinearGradient value), required TResult radial(RadialGradient value), required TResult sweep(SweepGradient value)}) → TResult -
@optionalTypeArgs, inherited
-
mapOrNull<
TResult extends Object?> ({TResult? linear(LinearGradient value)?, TResult? radial(RadialGradient value)?, TResult? sweep(SweepGradient value)?}) → TResult? -
@optionalTypeArgs, inherited
-
maybeMap<
TResult extends Object?> ({TResult linear(LinearGradient value)?, TResult radial(RadialGradient value)?, TResult sweep(SweepGradient value)?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
maybeWhen<
TResult extends Object?> ({TResult linear(Alignment begin, Alignment end, List< Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform)?, TResult radial(Alignment center, double radius, List<Color> colors, List<double> ? stops, TileMode tileMode, Alignment? focal, double focalRadius, GradientTransform? transform)?, TResult sweep(Alignment center, double startAngle, double endAngle, List<Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform)?, required TResult orElse()}) → TResult -
@optionalTypeArgs, inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> ({required TResult linear(Alignment begin, Alignment end, List< Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform), required TResult radial(Alignment center, double radius, List<Color> colors, List<double> ? stops, TileMode tileMode, Alignment? focal, double focalRadius, GradientTransform? transform), required TResult sweep(Alignment center, double startAngle, double endAngle, List<Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform)}) → TResult -
@optionalTypeArgs, inherited
-
whenOrNull<
TResult extends Object?> ({TResult? linear(Alignment begin, Alignment end, List< Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform)?, TResult? radial(Alignment center, double radius, List<Color> colors, List<double> ? stops, TileMode tileMode, Alignment? focal, double focalRadius, GradientTransform? transform)?, TResult? sweep(Alignment center, double startAngle, double endAngle, List<Color> colors, List<double> ? stops, TileMode tileMode, GradientTransform? transform)?}) → TResult? -
@optionalTypeArgs, inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited