From 6d19a9f1e0bd3eeb794975ba664d8a2402e7390b Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Fri, 2 Feb 2024 18:59:31 -0300 Subject: [PATCH] fix merge bug --- lib/src/attributes/decoration/decoration_dto.dart | 2 +- lib/src/attributes/decoration/image/decoration_image_dto.dart | 4 ++-- .../attributes/decoration/image/decoration_image_util.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/attributes/decoration/decoration_dto.dart b/lib/src/attributes/decoration/decoration_dto.dart index ae5ab235c..690e228c6 100644 --- a/lib/src/attributes/decoration/decoration_dto.dart +++ b/lib/src/attributes/decoration/decoration_dto.dart @@ -148,7 +148,7 @@ class BoxDecorationDto extends DecorationDto { boxShadow: boxShadow?.merge(other.boxShadow) ?? other.boxShadow, shape: other.shape ?? shape, backgroundBlendMode: other.backgroundBlendMode ?? backgroundBlendMode, - image: other.image ?? image, + image: image?.merge(other.image), ); } diff --git a/lib/src/attributes/decoration/image/decoration_image_dto.dart b/lib/src/attributes/decoration/image/decoration_image_dto.dart index d7d8908fd..de236a22e 100644 --- a/lib/src/attributes/decoration/image/decoration_image_dto.dart +++ b/lib/src/attributes/decoration/image/decoration_image_dto.dart @@ -4,7 +4,7 @@ import '../../../../mix.dart'; class DecorationImageDto extends Dto with Mergeable { - final ImageProvider image; + final ImageProvider? image; final BoxFit? fit; const DecorationImageDto({ @@ -37,7 +37,7 @@ class DecorationImageDto extends Dto @override DecorationImage resolve(MixData mix) { return DecorationImage( - image: image, + image: image ?? const AssetImage(''), fit: fit, ); } diff --git a/lib/src/attributes/decoration/image/decoration_image_util.dart b/lib/src/attributes/decoration/image/decoration_image_util.dart index d7fccb868..d98de60b5 100644 --- a/lib/src/attributes/decoration/image/decoration_image_util.dart +++ b/lib/src/attributes/decoration/image/decoration_image_util.dart @@ -27,7 +27,7 @@ class DecorationImageUtility }) { return builder( DecorationImageDto( - image: image ?? const AssetImage(''), + image: image, fit: fit, ), );