Skip to content

Commit

Permalink
Sync: 2024/10/01
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe committed Oct 2, 2024
1 parent 2143721 commit 56ff75b
Show file tree
Hide file tree
Showing 138 changed files with 3,658 additions and 2,050 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
experimental: false
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
Expand All @@ -73,12 +73,12 @@ jobs:
if: |
github.repository == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
Expand All @@ -126,12 +126,12 @@ jobs:
github.ref == 'refs/heads/main' &&
github.repository == 'cfug/flutter.cn'
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == 'cfug/flutter.cn' }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
submodules: recursive
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
The [documentation site][Flutter] for the [Flutter framework][],
built with [Eleventy][] and hosted on [Firebase][].

[![Build Status][]][Repo on GitHub Actions]
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/flutter/website/badge)](https://deps.dev/project/github/flutter%2Fwebsite)

[Flutter framework]: https://flutter.dev
[Eleventy]: https://11ty.dev/
[Firebase]: https://firebase.google.com/
Expand Down Expand Up @@ -117,7 +114,7 @@ If you prefer, you can use a version manager such as [nvm][],
and run `nvm install` from the repository's root directory.

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

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

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

Expand Down
4 changes: 4 additions & 0 deletions dash_site
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ if command -v pnpm &> /dev/null; then
echo "pnpm version $pnpm_version is too low. Version $REQUIRED_PNPM_VERSION or later is required."
exit 1
fi

# If using pnpm, update the dependencies silently as it is quick.
echo "Verifying npm dependencies are up to date..."
pnpm install --silent
fi

# Verify that Node packages have been installed.
Expand Down
2 changes: 1 addition & 1 deletion examples/codelabs
Submodule codelabs updated 881 files
2 changes: 1 addition & 1 deletion examples/example_utils/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ environment:
sdk: ^3.5.0

dependencies:
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/canvas.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class SignatureState extends State<Signature> {
});
},
onPanEnd: (details) => _points.add(null),
child:
// #docregion custom-paint
CustomPaint(
// #docregion custom-paint
child: CustomPaint(
painter: SignaturePainter(_points),
size: Size.infinite,
),
Expand Down
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/column.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class HomePage extends StatelessWidget {
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child:
// #docregion column
Column(
// #docregion column
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ class App extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const
// #docregion theme
CupertinoApp(
// #docregion theme
return const CupertinoApp(
theme: CupertinoThemeData(
brightness: Brightness.dark,
),
Expand All @@ -37,9 +36,8 @@ class HomePage extends StatelessWidget {
),
),
child: Center(
child:
// #docregion styling-text
Text(
// #docregion styling-text
child: Text(
'Hello, world!',
style: TextStyle(
fontSize: 30,
Expand Down
9 changes: 4 additions & 5 deletions examples/get-started/flutter-for/ios_devs/lib/images.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const Image(
image:
// #docregion asset-image
AssetImage('images/a_dot_burr.jpeg')
// #enddocregion asset-image
);
// #docregion asset-image
image: AssetImage('images/a_dot_burr.jpeg'),
// #enddocregion asset-image
);
}
}

Expand Down
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ class HomePage extends StatelessWidget {
),
),
child: Material(
child:
// #docregion list-view
ListView.builder(
// #docregion list-view
child: ListView.builder(
itemCount: mockPersons.length,
itemBuilder: (context, index) {
final person = mockPersons.elementAt(index);
Expand Down
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/openapp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class HomePage extends StatelessWidget {
return CupertinoPageScaffold(
child: SafeArea(
child: Center(
child:
// #docregion open-app-example
CupertinoButton(
// #docregion open-app-example
child: CupertinoButton(
onPressed: () async {
await launchUrl(
Uri.parse('https://google.com'),
Expand Down
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ class HomePage extends StatelessWidget {
Widget build(BuildContext context) {
return const Scaffold(
body: Center(
child:
// #docregion row
Row(
// #docregion row
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(CupertinoIcons.globe),
Expand Down
5 changes: 2 additions & 3 deletions examples/get-started/flutter-for/ios_devs/lib/scroll.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ class HomePage extends StatelessWidget {
// Finally, display the list of people on the screen,
// inside a scroll view of type
// SingleChildScrollView (equivalent of a ScrollView in SwiftUI).
body:
// #docregion scroll-example
SingleChildScrollView(
// #docregion scroll-example
body: SingleChildScrollView(
child: Column(
children: mockPersons
.map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ class _MyHomePageState extends State<MyHomePage> {
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child:
// #docregion animated-button
AnimatedRotation(
// #docregion animated-button
child: AnimatedRotation(
duration: const Duration(seconds: 1),
turns: turns,
curve: Curves.easeIn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ class MyWidget extends StatelessWidget {

@override
Widget build(BuildContext context) {
return
// #docregion access-string
const Text(Strings.welcomeMessage);
// #docregion access-string
return const Text(Strings.welcomeMessage);
// #enddocregion access-string
}
}
19 changes: 9 additions & 10 deletions examples/get-started/flutter-for/ios_devs/lib/stylingbutton.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ class HomePage extends StatelessWidget {
Widget build(BuildContext context) {
return CupertinoPageScaffold(
navigationBar: const CupertinoNavigationBar(
middle:
// #docregion custom-font
Text(
'Cupertino',
style: TextStyle(
fontSize: 40,
fontFamily: 'BungeeSpice',
),
)
// #enddocregion custom-font
// #docregion custom-font
middle: Text(
'Cupertino',
style: TextStyle(
fontSize: 40,
fontFamily: 'BungeeSpice',
),
),
// #enddocregion custom-font
),
child: Center(
// #docregion styling-button
child: CupertinoButton(
Expand Down
19 changes: 9 additions & 10 deletions examples/get-started/flutter-for/ios_devs/lib/text_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ class HomePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child:
// #docregion text-button
CupertinoButton(
onPressed: () {
// This closure is called when your button is tapped.
},
child: const Text('Do something'),
)
// #enddocregion text-button
),
// #docregion text-button
child: CupertinoButton(
onPressed: () {
// This closure is called when your button is tapped.
},
child: const Text('Do something'),
),
// #enddocregion text-button
),
);
}
}
10 changes: 5 additions & 5 deletions examples/layout/lakes/step3/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TitleSection extends StatelessWidget {
// #docregion button-with-text
class ButtonSection extends StatelessWidget {
const ButtonSection({super.key});
// #enddocregion button-with-text
// #enddocregion button-with-text

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -119,7 +119,7 @@ class ButtonSection extends StatelessWidget {
);
// #docregion button-start
}
// #docregion button-with-text
// #docregion button-with-text
}
// #enddocregion button-start

Expand All @@ -138,7 +138,7 @@ class ButtonWithText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
// #enddocregion button-section
// #enddocregion button-section
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expand All @@ -155,9 +155,9 @@ class ButtonWithText extends StatelessWidget {
),
),
],
// #docregion button-section
// #docregion button-section
);
}
// #enddocregion button-with-text
// #enddocregion button-with-text
}
// #enddocregion button-section
Loading

0 comments on commit 56ff75b

Please sign in to comment.