Skip to content

Commit b11f6ac

Browse files
committed
Merge branch 'main' into feat/image-opt
2 parents 6a706eb + f776299 commit b11f6ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1162
-990
lines changed

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Checkout repository
32-
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
32+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14
36+
uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14
47+
uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14
61+
uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6

.github/workflows/scorecards-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
steps:
2323
- name: "Checkout code"
24-
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
24+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
2525
with:
2626
persist-credentials: false
2727

2828
- name: "Run analysis"
29-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736
29+
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534
3030
with:
3131
results_file: results.sarif
3232
results_format: sarif
@@ -49,6 +49,6 @@ jobs:
4949

5050
# Upload the results to GitHub's code scanning dashboard.
5151
- name: "Upload to code-scanning"
52-
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14
52+
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6
5353
with:
5454
sarif_file: results.sarif

.github/workflows/test.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
experimental: false
3838
continue-on-error: ${{ matrix.experimental }}
3939
steps:
40-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
40+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
4141
with:
4242
submodules: recursive
4343
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -56,7 +56,7 @@ jobs:
5656
name: Check if code excerpts are up to date
5757
runs-on: ubuntu-latest
5858
steps:
59-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
59+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
6060
with:
6161
submodules: recursive
6262
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -71,17 +71,15 @@ jobs:
7171
name: Build site and check links
7272
runs-on: ubuntu-latest
7373
steps:
74-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
74+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
7575
with:
7676
submodules: recursive
7777
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
7878
with:
7979
sdk: stable
8080
- name: Fetch Dart packages
8181
run: dart pub get
82-
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d
83-
with:
84-
version: 8
82+
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
8583
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
8684
with:
8785
node-version: ${{ env.NODE_VERSION }}
@@ -99,7 +97,7 @@ jobs:
9997
name: Check if text can be replaced with site variables
10098
runs-on: ubuntu-latest
10199
steps:
102-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
100+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
103101
with:
104102
submodules: recursive
105103
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -114,7 +112,7 @@ jobs:
114112
name: Validate Firebase configuration
115113
runs-on: ubuntu-latest
116114
steps:
117-
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
115+
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
118116
with:
119117
submodules: recursive
120118
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30

examples/analysis/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: examples
22
description: dart.dev example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dependencies:
88
examples_util: {path: ../util}
99

1010
dev_dependencies:
11-
lints: ^3.0.0
11+
lints: ^4.0.0

examples/analysis_alt/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: examples
22
description: dart.dev example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dev_dependencies:
8-
lints: ^3.0.0
8+
lints: ^4.0.0

examples/async_await/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: async_await
22
description: dart.dev example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dependencies:
88
examples_util: {path: ../util}
99

1010
dev_dependencies:
11-
lints: ^3.0.0
11+
lints: ^4.0.0
1212
test: ^1.25.2

examples/build_runner_usage/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: build_runner_usage
22
description: dart.dev build_runner example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dev_dependencies:
88
args: ^2.4.0
99
build_runner: ^2.4.8
1010
build_test: ^2.2.2
11-
lints: ^3.0.0
11+
lints: ^4.0.0

examples/cli/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: cli_examples
22
description: Examples for CLI tutorials on dart.dev
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dependencies:
88
args: ^2.4.2
99

1010
dev_dependencies:
11-
lints: ^3.0.0
11+
lints: ^4.0.0
1212
test: ^1.25.2

examples/concurrency/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ version: 0.0.1
44
publish_to: none
55

66
environment:
7-
sdk: ^3.3.0
7+
sdk: ^3.4.0
88

99
dependencies:
1010
http: any
1111

1212
dev_dependencies:
13-
lints: ^3.0.0
13+
lints: ^4.0.0
1414
test: ^1.25.2

examples/create_libraries/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: dart.dev example code.
33
version: 1.0.0
44

55
environment:
6-
sdk: ^3.3.0
6+
sdk: ^3.4.0
77

88
dev_dependencies:
9-
lints: ^3.0.0
9+
lints: ^4.0.0
1010
test: ^1.25.2

examples/extension_methods/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ description: dart.dev example code.
33
version: 1.0.0
44

55
environment:
6-
sdk: ^3.3.0
6+
sdk: ^3.4.0
77

88
dev_dependencies:
9-
lints: ^3.0.0
9+
lints: ^4.0.0
1010
test: ^1.25.2

examples/fetch_data/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ description: Fetch data example
33
version: 0.0.1
44

55
environment:
6-
sdk: ^3.3.0
6+
sdk: ^3.4.0
77

88
dependencies:
99
http: ^1.2.0
1010

1111
dev_dependencies:
12-
lints: ^3.0.0
12+
lints: ^4.0.0

examples/futures/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ version: 0.0.1
44
publish_to: none
55

66
environment:
7-
sdk: ^3.3.0
7+
sdk: ^3.4.0
88

99
dependencies:
1010
examples_util: {path: ../util}
1111

1212
dev_dependencies:
13-
lints: ^3.0.0
13+
lints: ^4.0.0
1414
test: ^1.25.2

examples/html/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ description: dart.dev example code.
33
version: 0.0.1
44

55
environment:
6-
sdk: ^3.3.0
6+
sdk: ^3.4.0
77

88
dev_dependencies:
9-
lints: ^3.0.0
9+
lints: ^4.0.0
1010
test: ^1.25.2
1111
examples_util: {path: ../util}

examples/iterables/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: iterables_examples
22
description: dart.dev example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dev_dependencies:
88
examples_util: {path: ../util}
9-
lints: ^3.0.0
9+
lints: ^4.0.0
1010
test: ^1.25.2

examples/language/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: examples
22
description: dart.dev example code.
33

44
environment:
5-
sdk: ^3.3.0
5+
sdk: ^3.4.0
66

77
dependencies:
88
examples_util: { path: ../util }
99

1010
dev_dependencies:
11-
lints: ^3.0.0
11+
lints: ^4.0.0
1212
test: ^1.25.2

examples/misc/lib/language_tour/classes/employee.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Employee extends Person {
1919
// #docregion super
2020
// Person does not have a default constructor;
2121
// you must call super.fromJson().
22-
Employee.fromJson(super.data) : super.fromJson() {
22+
Employee.fromJson(Map data) : super.fromJson(data) {
2323
print('in Employee');
2424
}
2525
// #docregion method-then-constructor

examples/misc/lib/language_tour/classes/point_alt.dart

+66-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
///
77
// #docregion idiomatic-constructor
88
class Point {
9-
double x = 0;
10-
double y = 0;
9+
// Initializer list of variables and values
10+
double x = 2.0;
11+
double y = 2.0;
1112

1213
// Generative constructor with initializing formal parameters:
1314
Point(this.x, this.y);
@@ -34,3 +35,66 @@ class Point {
3435
// #docregion idiomatic-constructor
3536
}
3637
// #enddocregion idiomatic-constructor
38+
39+
// #docregion initialize-declaration
40+
class PointA {
41+
double x = 1.0;
42+
double y = 2.0;
43+
44+
// The implicit default constructor sets these variables to (1.0,2.0)
45+
// PointA();
46+
47+
@override
48+
String toString() {
49+
return 'PointA($x,$y)';
50+
}
51+
}
52+
// #enddocregion initialize-declaration
53+
54+
// #docregion initialize-formal
55+
class PointB {
56+
final double x;
57+
final double y;
58+
59+
// Sets the x and y instance variables
60+
// before the constructor body runs.
61+
PointB(this.x, this.y);
62+
63+
// Initializing formal parameters can also be optional.
64+
PointB.optional([this.x = 0.0, this.y = 0.0]);
65+
}
66+
// #enddocregion initialize-formal
67+
68+
// #docregion initialize-named
69+
class PointC {
70+
double x; // must be set in constructor
71+
double y; // must be set in constructor
72+
73+
// Generative constructor with initializing formal parameters
74+
// with default values
75+
PointC.named({this.x = 1.0, this.y = 1.0});
76+
77+
@override
78+
String toString() {
79+
return 'PointC.named($x,$y)';
80+
}
81+
}
82+
83+
// Constructor using named variables.
84+
final pointC = PointC.named(x: 2.0, y: 2.0);
85+
// #enddocregion initialize-named
86+
87+
// #docregion initialize-null
88+
class PointD {
89+
double? x; // null if not set in constructor
90+
double? y; // null if not set in constructor
91+
92+
// Generative constructor with initializing formal parameters
93+
PointD(this.x, this.y);
94+
95+
@override
96+
String toString() {
97+
return 'PointD($x,$y)';
98+
}
99+
}
100+
// #enddocregion initialize-null
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// #docregion named
2+
class Vector2d {
3+
// #enddocregion named
4+
final double x;
5+
final double y;
6+
7+
Vector2d(this.x, this.y);
8+
// #docregion named
9+
// ...
10+
Vector2d.named({required this.x, required this.y});
11+
}
12+
13+
class Vector3d extends Vector2d {
14+
final double z;
15+
16+
// Forward the y parameter to the named super constructor like:
17+
// Vector3d.yzPlane({required double y, required this.z})
18+
// : super.named(x: 0, y: y);
19+
Vector3d.yzPlane({required super.y, required this.z}) : super.named(x: 0);
20+
}
21+
// #enddocregion named
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// #docregion positional
2+
class Vector2d {
3+
final double x;
4+
final double y;
5+
6+
Vector2d(this.x, this.y);
7+
}
8+
9+
class Vector3d extends Vector2d {
10+
final double z;
11+
12+
// Forward the x and y parameters to the default super constructor like:
13+
// Vector3d(final double x, final double y, this.z) : super(x, y);
14+
Vector3d(super.x, super.y, this.z);
15+
}
16+
// #enddocregion positional

0 commit comments

Comments
 (0)