EffectLine constructor
Creates a new EffectLine with the specified parameters. Only the
texture
parameter is required, all other parameters are optional.
Implementation
EffectLine({
this.texture,
this.transferMode: BlendMode.dstOver,
List<Offset> points,
this.widthMode : EffectLineWidthMode.linear,
this.minWidth: 10.0,
this.maxWidth: 10.0,
this.widthGrowthSpeed: 0.0,
this.animationMode: EffectLineAnimationMode.none,
this.scrollSpeed: 0.1,
double scrollStart: 0.0,
this.fadeDuration,
this.fadeAfterDelay,
this.textureLoopLength,
this.simplify: true,
ColorSequence colorSequence
}) {
if (points == null)
this.points = <Offset>[];
else
this.points = points;
_colorSequence = colorSequence;
if (_colorSequence == null) {
_colorSequence = new ColorSequence.fromStartAndEndColor(
const Color(0xffffffff),
const Color(0xffffffff)
);
}
_offset = scrollStart;
_painter = new TexturedLinePainter(points, _colors, _widths, texture);
_painter.textureLoopLength = textureLoopLength;
}