Skip to content

Commit

Permalink
rename to SpacingSideDTO
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Jun 26, 2024
1 parent a04e80e commit 96736aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions packages/mix/lib/src/attributes/gap/gap_util.dart
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import '../../core/attribute.dart';
import '../../core/utility.dart';
import '../../theme/tokens/space_token.dart';
import 'gap_dto.dart';
import 'spacing_side_dto.dart';

final class GapUtility<T extends Attribute> extends MixUtility<T, GapDto> {
final class GapUtility<T extends Attribute>
extends MixUtility<T, SpacingSideDto> {
const GapUtility(super.builder);

T call(double value) => builder(GapDto(value));
T call(double value) => builder(SpacingSideDto(value));

T ref(SpaceToken ref) => builder(GapDto(ref()));
T ref(SpaceToken ref) => builder(SpacingSideDto(ref()));
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import '../../core/dto.dart';
import '../../core/factory/mix_data.dart';

class GapDto extends Dto<double> {
class SpacingSideDto extends Dto<double> {
final double? value;

const GapDto(this.value);
const SpacingSideDto(this.value);

@override
GapDto merge(GapDto? other) {
return GapDto(other?.value ?? value);
SpacingSideDto merge(SpacingSideDto? other) {
return SpacingSideDto(other?.value ?? value);
}

@override
Expand Down

0 comments on commit 96736aa

Please sign in to comment.