AdGradient constructor
AdGradient({})
Implementation
AdGradient({
required this.type,
this.colors,
this.orientation,
this.gradientCenter = const Alignment(0.5, 0.5),
this.radialGradientRadius,
}) : assert(
[LINEAR, RADIAL].contains(type),
'You must specify a valid gradient type. It can be: $LINEAR or $RADIAL',
),
assert(
colors != null && colors.length >= 2,
'You must specify at least two colors',
);