Skip to content

Commit 080de9c

Browse files
committed
Upgrade to Flutter 3.10 and Dart 3
1 parent 813afc4 commit 080de9c

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

lib/src/api/models/size.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ class SizeC with SerializableMixin, EquatableMixin {
6060
SizeC scaleTo(SizeC size) => SizeC(width / size.width, height / size.height);
6161

6262
/// Adds given [size] to this size and returns the result.
63-
SizeC operator +(SizeC size) => SizeC(width + size.width, height + size.height);
63+
SizeC operator +(SizeC size) =>
64+
SizeC(width + size.width, height + size.height);
6465

6566
/// Subtracts given [size] from this size and returns the result.
66-
SizeC operator -(SizeC size) => SizeC(width - size.width, height - size.height);
67+
SizeC operator -(SizeC size) =>
68+
SizeC(width - size.width, height - size.height);
6769

6870
/// Returns scaled up size by given [scale].
6971
SizeC operator *(double scale) => SizeC(width * scale, height * scale);

lib/src/api/nodes/app_bar_node.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class AppBarProperties with SerializableMixin, EquatableMixin {
132132
this.automaticallyImplyLeading = true,
133133
this.titleSpacing = 16,
134134
this.shadowColor = ColorRGBA.black,
135-
}): titleStyle = titleStyle ?? TextProp(fontSize: 20);
135+
}) : titleStyle = titleStyle ?? TextProp(fontSize: 20);
136136

137137
/// Duplicate this [AppBarProperties] instance with the given data overrides.
138138
AppBarProperties copyWith({

lib/src/api/nodes/base_node.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -739,16 +739,16 @@ abstract class BaseNode with SerializableMixin, EquatableMixin {
739739
switch (axis) {
740740
case AxisC.horizontal:
741741
if (resolvedConstraints.minWidth != null) {
742-
final constrainedMinWidth =
743-
(minInnerSize.minWidth ?? 0) + (resolvedConstraints.minWidth ?? 0);
742+
final constrainedMinWidth = (minInnerSize.minWidth ?? 0) +
743+
(resolvedConstraints.minWidth ?? 0);
744744

745745
return constrainedMinWidth + horizontalEdgeSpace;
746746
}
747747
return value;
748748
case AxisC.vertical:
749749
if (resolvedConstraints.minHeight != null) {
750-
final constrainedMinHeight =
751-
(minInnerSize.minHeight ?? 0) + (resolvedConstraints.minHeight ?? 0);
750+
final constrainedMinHeight = (minInnerSize.minHeight ?? 0) +
751+
(resolvedConstraints.minHeight ?? 0);
752752

753753
return constrainedMinHeight + verticalEdgeSpace;
754754
}

lib/src/api/nodes/button_node.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ class ButtonProperties with ShapeBorderMixin, SerializableMixin {
252252
ColorRGBA? borderColor,
253253
CShapeBorder shape = CShapeBorder.roundedRectangle,
254254
double? borderWidth,
255-
}) : labelStyle = labelStyle ?? TextProp.general(fills: []) {
255+
}) : labelStyle =
256+
labelStyle ?? TextProp.general(fills: List.empty(growable: true)) {
256257
setShapeBorderMixin(
257258
shape: shape,
258259
cornerRadius: cornerRadius,

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ repository: https://github.com/Codelessly/CodelesslyAPI
88
issue_tracker: https://github.com/Codelessly/CodelesslyAPI/issues
99

1010
environment:
11-
sdk: '>=2.19.0 <3.0.0'
11+
sdk: '>=3.0.0 <4.0.0'
1212

1313
dependencies:
1414
equatable: ^2.0.5
1515
json_annotation: ^4.8.1
1616
vector_math: ^2.1.4
17-
collection: ^1.17.0
17+
collection: ^1.17.1
1818

1919
dev_dependencies:
20-
build_runner: ^2.3.3
20+
build_runner: ^2.4.2
2121
flutter_lints: ^2.0.1
2222
json_serializable: ^6.6.2
23-
lints: ^2.0.1
23+
lints: ^2.1.0
2424

2525
scripts: scripts.yaml

0 commit comments

Comments
 (0)