From 196ca91eeb84a4df3eccd6c11bde9510d8605888 Mon Sep 17 00:00:00 2001 From: Philipp Redeker Date: Tue, 6 Feb 2024 11:12:03 +0100 Subject: [PATCH] feature: added blendMode to BlobStyles --- lib/src/models.dart | 2 ++ lib/src/painter/tools.dart | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/src/models.dart b/lib/src/models.dart index 399be50..c666259 100644 --- a/lib/src/models.dart +++ b/lib/src/models.dart @@ -36,11 +36,13 @@ class BlobStyles { Shader? gradient; int? strokeWidth; BlobFillType? fillType; + BlendMode? blendMode; BlobStyles({ this.color, this.gradient, this.fillType, this.strokeWidth, + this.blendMode, }); } diff --git a/lib/src/painter/tools.dart b/lib/src/painter/tools.dart index 276bd2b..8c7aef9 100644 --- a/lib/src/painter/tools.dart +++ b/lib/src/painter/tools.dart @@ -67,6 +67,9 @@ Paint createPaint(BlobStyles? styles) { paint.shader = styles.gradient; paint.strokeWidth = (styles.strokeWidth ?? BlobConfig.strokeWidth).toDouble(); paint.style = fillType[styles.fillType ?? BlobConfig.fillType]!; + if (styles.blendMode != null) { + paint.blendMode = styles.blendMode!; + } return paint; }