Skip to content

Commit

Permalink
Clean up and further merge issues
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Feb 2, 2024
1 parent aa4962a commit 48be98b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/src/attributes/gradient/gradient_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class LinearGradientDto extends GradientDto<LinearGradient> {
end: other.end ?? end,
tileMode: other.tileMode ?? tileMode,
transform: other.transform ?? transform,
colors: colors?.merge(other.colors),
stops: stops?.merge(other.stops),
colors: colors?.merge(other.colors) ?? other.colors,
stops: stops?.merge(other.stops) ?? other.stops,
);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/attributes/shadow/shadow_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class ShadowDto extends ShadowDtoImpl<ShadowDto, Shadow> {

return ShadowDto(
blurRadius: other.blurRadius ?? blurRadius,
color: other.color ?? color,
color: color?.merge(other.color) ?? other.color,
offset: other.offset ?? offset,
);
}
Expand Down
3 changes: 1 addition & 2 deletions lib/src/attributes/text_style/text_style_dto.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:flutter/material.dart';

import '../../core/attribute.dart';
import '../../core/extensions/iterable_ext.dart';
import '../../core/extensions/values_ext.dart';
import '../../factory/mix_provider_data.dart';
import '../../theme/tokens/text_style_token.dart';
import '../color/color_dto.dart';
Expand Down Expand Up @@ -108,7 +107,7 @@ class TextStyleData extends Dto<TextStyle> with Mergeable<TextStyleData> {
height: style.height,
letterSpacing: style.letterSpacing,
locale: style.locale,
shadows: style.shadows?.map((e) => e.toDto()).toList(),
shadows: style.shadows?.map(ShadowDto.from).toList(),
textBaseline: style.textBaseline,
wordSpacing: style.wordSpacing,
);
Expand Down
1 change: 1 addition & 0 deletions lib/src/decorators/widget_decorators.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class ScaleDecorator extends WidgetDecorator<ScaleDecorator> {

enum ClipType { path, oval, rect, rRect, triangle }

// TODO: Implement BorderRadiusGeometryDto
class ClipDecorator<T> extends WidgetDecorator<ClipDecorator>
with Mergeable<ClipDecorator> {
final ClipType clipType;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/specs/icon/icon_attribute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class IconSpecAttribute extends SpecAttribute<IconSpecAttribute, IconSpec> {

return IconSpecAttribute(
size: size ?? other.size,
color: color ?? other.color,
color: color?.merge(other.color) ?? other.color,
);
}

Expand Down
6 changes: 3 additions & 3 deletions lib/src/specs/image/image_attribute.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ class ImageSpecAttribute extends SpecAttribute<ImageSpecAttribute, ImageSpec> {
if (other == null) return this;

return ImageSpecAttribute(
centerSlice: other.centerSlice ?? centerSlice,
width: other.width ?? width,
height: other.height ?? height,
color: other.color ?? color,
color: color?.merge(other.color) ?? other.color,
repeat: other.repeat ?? repeat,
fit: other.fit ?? fit,
alignment: other.alignment ?? alignment,
centerSlice: other.centerSlice ?? centerSlice,
filterQuality: other.filterQuality ?? filterQuality,
colorBlendMode: other.colorBlendMode ?? colorBlendMode,
filterQuality: other.filterQuality ?? filterQuality,
);
}

Expand Down

0 comments on commit 48be98b

Please sign in to comment.