Skip to content

Commit 6f65204

Browse files
committed
Sync: 2024/10/01
1 parent 2143721 commit 6f65204

File tree

138 files changed

+3653
-2045
lines changed

Some content is hidden

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

138 files changed

+3653
-2045
lines changed

.github/workflows/build.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
experimental: false
3232
continue-on-error: ${{ matrix.experimental }}
3333
steps:
34-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
34+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
3535
with:
3636
submodules: recursive
3737
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
@@ -55,7 +55,7 @@ jobs:
5555
runs-on: ubuntu-latest
5656
if: github.repository == 'cfug/flutter.cn'
5757
steps:
58-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
58+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
5959
with:
6060
submodules: recursive
6161
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
@@ -73,12 +73,12 @@ jobs:
7373
if: |
7474
github.repository == 'cfug/flutter.cn'
7575
steps:
76-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
76+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
7777
with:
7878
submodules: recursive
7979
- name: Enable Corepack
8080
run: corepack enable
81-
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
81+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
8282
with:
8383
node-version: ${{ env.NODE_VERSION }}
8484
cache: 'pnpm'
@@ -106,7 +106,7 @@ jobs:
106106
runs-on: ubuntu-latest
107107
if: github.repository == 'cfug/flutter.cn'
108108
steps:
109-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
109+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
110110
with:
111111
submodules: recursive
112112
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
@@ -126,12 +126,12 @@ jobs:
126126
github.ref == 'refs/heads/main' &&
127127
github.repository == 'cfug/flutter.cn'
128128
steps:
129-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
129+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
130130
with:
131131
submodules: recursive
132132
- name: Enable Corepack
133133
run: corepack enable
134-
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
134+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
135135
with:
136136
node-version: ${{ env.NODE_VERSION }}
137137
cache: 'pnpm'

.github/workflows/stage.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
runs-on: ubuntu-latest
2121
if: ${{ github.event.pull_request.head.repo.full_name == 'cfug/flutter.cn' }}
2222
steps:
23-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
23+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
2424
with:
2525
submodules: recursive
2626
- name: Enable Corepack
2727
run: corepack enable
28-
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
28+
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
2929
with:
3030
node-version: ${{ env.NODE_VERSION }}
3131
cache: 'pnpm'

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
The [documentation site][Flutter] for the [Flutter framework][],
88
built with [Eleventy][] and hosted on [Firebase][].
99

10-
[![Build Status][]][Repo on GitHub Actions]
11-
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/flutter/website/badge)](https://deps.dev/project/github/flutter%2Fwebsite)
12-
1310
[Flutter framework]: https://flutter.dev
1411
[Eleventy]: https://11ty.dev/
1512
[Firebase]: https://firebase.google.com/
@@ -117,7 +114,7 @@ If you prefer, you can use a version manager such as [nvm][],
117114
and run `nvm install` from the repository's root directory.
118115

119116
If you already have Node installed, verify it's available on your path
120-
and already the latest stable version _(currently `20.12` or later)_:
117+
and already the latest stable version _(currently `20.17` or later)_:
121118

122119
```console
123120
node --version
@@ -220,7 +217,7 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
220217
To install [`pnpm`][] without using `corepack`, you
221218
can use your preferred [installation method][pnpm-install].
222219

223-
5. (optional) Once you have `pnpm` installed and setup,
220+
5. _(optional)_ Once you have `pnpm` installed and setup,
224221
fetch the site's npm dependencies using `pnpm install`.
225222
We highly recommend you use `pnpm`, but you can also use `npm`.
226223

dash_site

+4
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ if command -v pnpm &> /dev/null; then
7979
echo "pnpm version $pnpm_version is too low. Version $REQUIRED_PNPM_VERSION or later is required."
8080
exit 1
8181
fi
82+
83+
# If using pnpm, update the dependencies silently as it is quick.
84+
echo "Verifying npm dependencies are up to date..."
85+
pnpm install --silent
8286
fi
8387

8488
# Verify that Node packages have been installed.

examples/codelabs

Submodule codelabs updated 881 files

examples/example_utils/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ environment:
66
sdk: ^3.5.0
77

88
dependencies:
9-
flutter_lints: ^4.0.0
9+
flutter_lints: ^5.0.0

examples/get-started/flutter-for/ios_devs/lib/canvas.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ class SignatureState extends State<Signature> {
3030
});
3131
},
3232
onPanEnd: (details) => _points.add(null),
33-
child:
34-
// #docregion custom-paint
35-
CustomPaint(
33+
// #docregion custom-paint
34+
child: CustomPaint(
3635
painter: SignaturePainter(_points),
3736
size: Size.infinite,
3837
),

examples/get-started/flutter-for/ios_devs/lib/column.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ class HomePage extends StatelessWidget {
2323
Widget build(BuildContext context) {
2424
return const Scaffold(
2525
body: Center(
26-
child:
27-
// #docregion column
28-
Column(
26+
// #docregion column
27+
child: Column(
2928
mainAxisAlignment: MainAxisAlignment.center,
3029
children: [
3130
Icon(CupertinoIcons.globe),

examples/get-started/flutter-for/ios_devs/lib/cupertino_themes.dart

+4-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ class App extends StatelessWidget {
1313

1414
@override
1515
Widget build(BuildContext context) {
16-
return const
17-
// #docregion theme
18-
CupertinoApp(
16+
// #docregion theme
17+
return const CupertinoApp(
1918
theme: CupertinoThemeData(
2019
brightness: Brightness.dark,
2120
),
@@ -37,9 +36,8 @@ class HomePage extends StatelessWidget {
3736
),
3837
),
3938
child: Center(
40-
child:
41-
// #docregion styling-text
42-
Text(
39+
// #docregion styling-text
40+
child: Text(
4341
'Hello, world!',
4442
style: TextStyle(
4543
fontSize: 30,

examples/get-started/flutter-for/ios_devs/lib/images.dart

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ class MyWidget extends StatelessWidget {
66
@override
77
Widget build(BuildContext context) {
88
return const Image(
9-
image:
10-
// #docregion asset-image
11-
AssetImage('images/a_dot_burr.jpeg')
12-
// #enddocregion asset-image
13-
);
9+
// #docregion asset-image
10+
image: AssetImage('images/a_dot_burr.jpeg'),
11+
// #enddocregion asset-image
12+
);
1413
}
1514
}
1615

examples/get-started/flutter-for/ios_devs/lib/navigation.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,8 @@ class HomePage extends StatelessWidget {
6666
),
6767
),
6868
child: Material(
69-
child:
70-
// #docregion list-view
71-
ListView.builder(
69+
// #docregion list-view
70+
child: ListView.builder(
7271
itemCount: mockPersons.length,
7372
itemBuilder: (context, index) {
7473
final person = mockPersons.elementAt(index);

examples/get-started/flutter-for/ios_devs/lib/openapp.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ class HomePage extends StatelessWidget {
3030
return CupertinoPageScaffold(
3131
child: SafeArea(
3232
child: Center(
33-
child:
34-
// #docregion open-app-example
35-
CupertinoButton(
33+
// #docregion open-app-example
34+
child: CupertinoButton(
3635
onPressed: () async {
3736
await launchUrl(
3837
Uri.parse('https://google.com'),

examples/get-started/flutter-for/ios_devs/lib/row.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ class HomePage extends StatelessWidget {
2323
Widget build(BuildContext context) {
2424
return const Scaffold(
2525
body: Center(
26-
child:
27-
// #docregion row
28-
Row(
26+
// #docregion row
27+
child: Row(
2928
mainAxisAlignment: MainAxisAlignment.center,
3029
children: [
3130
Icon(CupertinoIcons.globe),

examples/get-started/flutter-for/ios_devs/lib/scroll.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,8 @@ class HomePage extends StatelessWidget {
8080
// Finally, display the list of people on the screen,
8181
// inside a scroll view of type
8282
// SingleChildScrollView (equivalent of a ScrollView in SwiftUI).
83-
body:
84-
// #docregion scroll-example
85-
SingleChildScrollView(
83+
// #docregion scroll-example
84+
body: SingleChildScrollView(
8685
child: Column(
8786
children: mockPersons
8887
.map(

examples/get-started/flutter-for/ios_devs/lib/simple_animation.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ class _MyHomePageState extends State<MyHomePage> {
2727
Widget build(BuildContext context) {
2828
return Scaffold(
2929
body: Center(
30-
child:
31-
// #docregion animated-button
32-
AnimatedRotation(
30+
// #docregion animated-button
31+
child: AnimatedRotation(
3332
duration: const Duration(seconds: 1),
3433
turns: turns,
3534
curve: Curves.easeIn,

examples/get-started/flutter-for/ios_devs/lib/string_examples.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ class MyWidget extends StatelessWidget {
1111

1212
@override
1313
Widget build(BuildContext context) {
14-
return
15-
// #docregion access-string
16-
const Text(Strings.welcomeMessage);
14+
// #docregion access-string
15+
return const Text(Strings.welcomeMessage);
1716
// #enddocregion access-string
1817
}
1918
}

examples/get-started/flutter-for/ios_devs/lib/stylingbutton.dart

+9-10
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,16 @@ class HomePage extends StatelessWidget {
3030
Widget build(BuildContext context) {
3131
return CupertinoPageScaffold(
3232
navigationBar: const CupertinoNavigationBar(
33-
middle:
34-
// #docregion custom-font
35-
Text(
36-
'Cupertino',
37-
style: TextStyle(
38-
fontSize: 40,
39-
fontFamily: 'BungeeSpice',
40-
),
41-
)
42-
// #enddocregion custom-font
33+
// #docregion custom-font
34+
middle: Text(
35+
'Cupertino',
36+
style: TextStyle(
37+
fontSize: 40,
38+
fontFamily: 'BungeeSpice',
4339
),
40+
),
41+
// #enddocregion custom-font
42+
),
4443
child: Center(
4544
// #docregion styling-button
4645
child: CupertinoButton(

examples/get-started/flutter-for/ios_devs/lib/text_button.dart

+9-10
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,15 @@ class HomePage extends StatelessWidget {
2323
Widget build(BuildContext context) {
2424
return Scaffold(
2525
body: Center(
26-
child:
27-
// #docregion text-button
28-
CupertinoButton(
29-
onPressed: () {
30-
// This closure is called when your button is tapped.
31-
},
32-
child: const Text('Do something'),
33-
)
34-
// #enddocregion text-button
35-
),
26+
// #docregion text-button
27+
child: CupertinoButton(
28+
onPressed: () {
29+
// This closure is called when your button is tapped.
30+
},
31+
child: const Text('Do something'),
32+
),
33+
// #enddocregion text-button
34+
),
3635
);
3736
}
3837
}

examples/layout/lakes/step3/lib/main.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class TitleSection extends StatelessWidget {
8989
// #docregion button-with-text
9090
class ButtonSection extends StatelessWidget {
9191
const ButtonSection({super.key});
92-
// #enddocregion button-with-text
92+
// #enddocregion button-with-text
9393

9494
@override
9595
Widget build(BuildContext context) {
@@ -119,7 +119,7 @@ class ButtonSection extends StatelessWidget {
119119
);
120120
// #docregion button-start
121121
}
122-
// #docregion button-with-text
122+
// #docregion button-with-text
123123
}
124124
// #enddocregion button-start
125125

@@ -138,7 +138,7 @@ class ButtonWithText extends StatelessWidget {
138138
@override
139139
Widget build(BuildContext context) {
140140
return Column(
141-
// #enddocregion button-section
141+
// #enddocregion button-section
142142
mainAxisSize: MainAxisSize.min,
143143
mainAxisAlignment: MainAxisAlignment.center,
144144
children: [
@@ -155,9 +155,9 @@ class ButtonWithText extends StatelessWidget {
155155
),
156156
),
157157
],
158-
// #docregion button-section
158+
// #docregion button-section
159159
);
160160
}
161-
// #enddocregion button-with-text
161+
// #enddocregion button-with-text
162162
}
163163
// #enddocregion button-section

0 commit comments

Comments
 (0)