Skip to content

Commit

Permalink
update className
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Jun 27, 2024
1 parent 10ad2c5 commit 18cad24
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ scripts:
brb:
description: Run build_runner for projects that have it as a dependency
steps:
- melos run build_runner_clean
- melos run brbc
- melos exec --depends-on="build_runner" --category="mix_deps" dart run build_runner build --delete-conflicting-outputs
brbc:
run: melos exec --depends-on="build_runner" dart run build_runner clean
Expand Down
2 changes: 2 additions & 0 deletions packages/mix/lib/src/attributes/attributes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export 'constraints/constraints_dto.dart';
export 'decoration/decoration_dto.dart';
export 'decoration/image/decoration_image_dto.dart';
export 'enum/enum_util.dart';
export 'gap/gap_util.dart';
export 'gap/spacing_side_dto.dart';
export 'gradient/gradient_dto.dart';
export 'nested_style/nested_style_attribute.dart';
export 'nested_style/nested_style_util.dart';
Expand Down
5 changes: 1 addition & 4 deletions packages/mix/lib/src/specs/flex/flex_spec.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ import 'package:flutter/widgets.dart';
import 'package:mix/mix.dart';
import 'package:mix_annotations/mix_annotations.dart';

import '../../attributes/gap/gap_dto.dart';
import '../../attributes/gap/gap_util.dart';

part 'flex_spec.g.dart';

@MixableSpec()
Expand All @@ -29,7 +26,7 @@ final class FlexSpec extends Spec<FlexSpec> with _$FlexSpec {
final TextBaseline? textBaseline;
final Clip? clipBehavior;
@MixableProperty(
dto: MixableFieldDto(type: GapDto),
dto: MixableFieldDto(type: SpacingSideDto),
utilities: [MixableUtility(type: GapUtility)],
)
final double? gap;
Expand Down
4 changes: 2 additions & 2 deletions packages/mix/lib/src/specs/flex/flex_spec.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions packages/mix/test/src/specs/flex/flex_attribute_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mix/mix.dart';
import 'package:mix/src/attributes/gap/gap_dto.dart';

import '../../../helpers/testing_utils.dart';

Expand Down Expand Up @@ -31,7 +30,7 @@ void main() {
textDirection: TextDirection.rtl,
textBaseline: TextBaseline.alphabetic,
clipBehavior: Clip.antiAlias,
gap: GapDto(10.0),
gap: SpacingSideDto(10.0),
);
final mixData = MixData.create(MockBuildContext(), Style(attribute));
final resolvedSpec = attribute.resolve(mixData);
Expand Down Expand Up @@ -96,7 +95,7 @@ void main() {
textDirection: TextDirection.rtl,
textBaseline: TextBaseline.alphabetic,
clipBehavior: Clip.antiAlias,
gap: GapDto(10.0),
gap: SpacingSideDto(10.0),
);
const attribute2 = FlexSpecAttribute(
direction: Axis.vertical,
Expand All @@ -107,7 +106,7 @@ void main() {
textDirection: TextDirection.ltr,
textBaseline: TextBaseline.ideographic,
clipBehavior: Clip.hardEdge,
gap: GapDto(20.0),
gap: SpacingSideDto(20.0),
);
final mergedAttribute = attribute1.merge(attribute2);

Expand All @@ -119,7 +118,7 @@ void main() {
expect(mergedAttribute.textDirection, TextDirection.ltr);
expect(mergedAttribute.textBaseline, TextBaseline.ideographic);
expect(mergedAttribute.clipBehavior, Clip.hardEdge);
expect(mergedAttribute.gap, const GapDto(20.0));
expect(mergedAttribute.gap, const SpacingSideDto(20.0));
});
});
}
3 changes: 1 addition & 2 deletions packages/mix/test/src/specs/flex/flex_spec_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mix/mix.dart';
import 'package:mix/src/attributes/gap/gap_dto.dart';

import '../../../helpers/testing_utils.dart';

Expand All @@ -22,7 +21,7 @@ void main() {
textDirection: TextDirection.ltr,
textBaseline: TextBaseline.alphabetic,
clipBehavior: Clip.antiAlias,
gap: GapDto(10),
gap: SpacingSideDto(10),
),
),
);
Expand Down
3 changes: 1 addition & 2 deletions packages/mix/test/src/specs/flex/flex_util_test.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mix/mix.dart';
import 'package:mix/src/attributes/gap/gap_dto.dart';

void main() {
group('FlexUtility', () {
Expand Down Expand Up @@ -90,7 +89,7 @@ void main() {
test('gap() returns correct instance', () {
final flex = flexUtility.gap(10);

expect(flex.gap, const GapDto(10));
expect(flex.gap, const SpacingSideDto(10));
});

// row()
Expand Down

0 comments on commit 18cad24

Please sign in to comment.