Skip to content

Commit 196ca91

Browse files
committed
feature: added blendMode to BlobStyles
1 parent 80d8a41 commit 196ca91

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/src/models.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ class BlobStyles {
3636
Shader? gradient;
3737
int? strokeWidth;
3838
BlobFillType? fillType;
39+
BlendMode? blendMode;
3940
BlobStyles({
4041
this.color,
4142
this.gradient,
4243
this.fillType,
4344
this.strokeWidth,
45+
this.blendMode,
4446
});
4547
}
4648

lib/src/painter/tools.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ Paint createPaint(BlobStyles? styles) {
6767
paint.shader = styles.gradient;
6868
paint.strokeWidth = (styles.strokeWidth ?? BlobConfig.strokeWidth).toDouble();
6969
paint.style = fillType[styles.fillType ?? BlobConfig.fillType]!;
70+
if (styles.blendMode != null) {
71+
paint.blendMode = styles.blendMode!;
72+
}
7073

7174
return paint;
7275
}

0 commit comments

Comments
 (0)