Skip to content

Commit

Permalink
fix merge bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Feb 2, 2024
1 parent c3c5a2b commit 6d19a9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/src/attributes/decoration/decoration_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class BoxDecorationDto extends DecorationDto<BoxDecoration> {
boxShadow: boxShadow?.merge(other.boxShadow) ?? other.boxShadow,
shape: other.shape ?? shape,
backgroundBlendMode: other.backgroundBlendMode ?? backgroundBlendMode,
image: other.image ?? image,
image: image?.merge(other.image),
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/src/attributes/decoration/image/decoration_image_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../../../mix.dart';

class DecorationImageDto extends Dto<DecorationImage>
with Mergeable<DecorationImageDto> {
final ImageProvider image;
final ImageProvider? image;
final BoxFit? fit;

const DecorationImageDto({
Expand Down Expand Up @@ -37,7 +37,7 @@ class DecorationImageDto extends Dto<DecorationImage>
@override
DecorationImage resolve(MixData mix) {
return DecorationImage(
image: image,
image: image ?? const AssetImage(''),
fit: fit,
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DecorationImageUtility<T extends StyleAttribute>
}) {
return builder(
DecorationImageDto(
image: image ?? const AssetImage(''),
image: image,
fit: fit,
),
);
Expand Down

0 comments on commit 6d19a9f

Please sign in to comment.