Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tilucasoli committed Feb 6, 2025
1 parent 2cdae74 commit 64d0fc5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
11 changes: 6 additions & 5 deletions packages/remix/lib/src/components/header/header_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ class HeaderDarkStyle extends HeaderStyle {
$.subtitle.color.grey.shade200(),
];

final containerStyle = [
$.container.color.black(),
];
final containerStyle = [$.container.color.black()];

return Style.create(
[super.makeStyle(spec).call(), ...textStyle, ...containerStyle]);
return Style.create([
super.makeStyle(spec).call(),
...textStyle,
...containerStyle,
]);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SegmentedControlStyle extends SpecStyle<SegmentedControlSpecUtility> {
..wrap.intrinsicHeight()
..padding.all(4)
..borderRadius.all(8)
..color(Colors.black.withOpacity(0.07)),
..color(Colors.black.withValues(alpha: 0.7)),

Check failure on line 17 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
];

final dividerStyle = [
Expand All @@ -33,25 +33,25 @@ class SegmentedControlStyle extends SpecStyle<SegmentedControlSpecUtility> {

final itemStyle = [
$.item.label.chain
..style.color(Colors.black.withOpacity(0.6))
..style.color(Colors.black.withValues(alpha: 0.6))

Check failure on line 36 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
..style.fontSize(14),
$.item.icon.chain
..size(20)
..color(Colors.black.withOpacity(0.6)),
..color(Colors.black.withValues(alpha: 0.6)),

Check failure on line 40 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
$.item.container.chain
..padding.vertical(6)
..padding.horizontal(12)
..borderRadius.all(6),
spec.on.selected(
$.item.container.chain
..color.white()
..shadow.color(Colors.black.withOpacity(0.1))
..shadow.color(Colors.black.withValues(alpha: 0.1))

Check failure on line 48 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
..shadow.offset(0, 2)
..shadow.spreadRadius(1)
..shadow.blurRadius(4),
$.item.chain
..icon.color(Colors.black.withOpacity(1))
..label.style.color(Colors.black.withOpacity(1)),
..icon.color(Colors.black.withValues(alpha: 1))

Check failure on line 53 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
..label.style.color(Colors.black.withValues(alpha: 1)),

Check failure on line 54 in packages/remix/lib/src/components/segmented_control/segmented_control_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
),
];

Expand Down
4 changes: 2 additions & 2 deletions packages/remix/lib/src/components/select/select_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ class SelectStyle extends SpecStyle<SelectSpecUtility> {
..style.fontSize(14)
..style.color.black(),
spec.on.disabled(
$.button.container.color(Colors.black.withOpacity(0.05)),
$.button.container.color(Colors.black.withValues(alpha: 0.05)),

Check failure on line 30 in packages/remix/lib/src/components/select/select_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
),
];

final menuStyle = [
$.menu.container.chain
..borderRadius(6)
..shadow.color(Colors.black.withOpacity(0.07))
..shadow.color(Colors.black.withValues(alpha: 0.07))

Check failure on line 37 in packages/remix/lib/src/components/select/select_style.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.
..shadow.blurRadius(5)
..color.white()
..border.color.black12()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class DottedSpinnerPainter extends SpinnerPainter {
final angle = i * lineAngle;
final opacity = (lines - i + animation.value * lines) % lines / lines;

paint.color = color.withOpacity(opacity);
paint.color = color.withValues(alpha: opacity);

Check failure on line 40 in packages/remix/lib/src/components/spinner/spinner_painter.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.

final lineHeight = radius * 0.45;

Expand Down Expand Up @@ -78,7 +78,7 @@ class StrippedSpinnerPainter extends SpinnerPainter {
final angle = i * lineAngle;
final opacity = (lines - i + animation.value * lines) % lines / lines;

paint.color = color.withOpacity(opacity);
paint.color = color.withValues(alpha: opacity);

Check failure on line 81 in packages/remix/lib/src/components/spinner/spinner_painter.dart

View workflow job for this annotation

GitHub Actions / Test Min SDK

The method 'withValues' isn't defined for the type 'Color'.

Try correcting the name to the name of an existing method, or defining a method named 'withValues'. See https://dart.dev/diagnostics/undefined_method to learn more about this problem.

final lineHeight = radius * 0.8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ class FortalezaButtonStyle extends ButtonStyle {
return Style.create([
$.container.color(color),
spec.on.hover(
$.container.color(color.withOpacity(0.8)),
$.container.color(color.withValues(alpha: 0.8)),
),
soft(
$.container.color(color.withOpacity(0.1)),
$.container.color(color.withValues(alpha: 0.1)),
$.label.style.color(color),
spec.on.hover(
$.container.color(color.withOpacity(0.2)),
$.container.color(color.withValues(alpha: 0.2)),
),
spec.on.disabled(
disabled(),
Expand All @@ -68,11 +68,11 @@ class FortalezaButtonStyle extends ButtonStyle {
),
),
surface(
$.container.color(color.withOpacity(0.1)),
$.container.border.color(color.withOpacity(0.7)),
$.container.color(color.withValues(alpha: 0.1)),
$.container.border.color(color.withValues(alpha: 0.7)),
$.label.style.color(color),
spec.on.hover(
$.container.color(color.withOpacity(0.2)),
$.container.color(color.withValues(alpha: 0.2)),
$.container.border.color.withOpacity(0.8),
),
spec.on.disabled(
Expand Down

0 comments on commit 64d0fc5

Please sign in to comment.