toFlutterPaint method
Creates a Paint object from this DrawablePaint.
Implementation
Paint toFlutterPaint() {
final Paint paint = Paint();
// Null chekcs are needed here because the setters assert.
if (blendMode != null) {
paint.blendMode = blendMode!;
}
if (color != null) {
paint.color = color!;
}
if (colorFilter != null) {
paint.colorFilter = colorFilter;
}
if (filterQuality != null) {
paint.filterQuality = filterQuality!;
}
if (isAntiAlias != null) {
paint.isAntiAlias = isAntiAlias!;
}
if (maskFilter != null) {
paint.maskFilter = maskFilter;
}
if (shader != null) {
paint.shader = shader;
}
if (strokeCap != null) {
paint.strokeCap = strokeCap!;
}
if (strokeJoin != null) {
paint.strokeJoin = strokeJoin!;
}
if (strokeMiterLimit != null) {
paint.strokeMiterLimit = strokeMiterLimit!;
}
if (strokeWidth != null) {
paint.strokeWidth = strokeWidth!;
}
if (style != null) {
paint.style = style!;
}
return paint;
}