Skip to content

Commit

Permalink
[sync] 2024/06/01 (#1458)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe authored Jun 3, 2024
2 parents 56fa7f9 + c95b66a commit b181aaf
Show file tree
Hide file tree
Showing 111 changed files with 4,256 additions and 3,683 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,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.10` or later)_:
and already the latest stable version _(currently `20.12` or later)_:

```console
node --version
Expand Down Expand Up @@ -226,6 +226,10 @@ following the instructions in [Get the prerequisites](#get-the-prerequisites).
```console
pnpm install
```
Rerun `pnpm install` whenever you incorporate the
latest changes to the `main` branch or if you
experience dependency or import errors when building the site.

5. From the root directory, run the `dash_site` tool to
validate your setup and learn about the available commands.
Expand Down
6 changes: 3 additions & 3 deletions dash_site
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash

REQUIRED_DART_VERSION="3.3"
REQUIRED_NODE_VERSION="20.10"
REQUIRED_PNPM_VERSION="8.14"
REQUIRED_DART_VERSION="3.4"
REQUIRED_NODE_VERSION="20.12"
REQUIRED_PNPM_VERSION="9.0"

# Check that the 'dart' command is available on the user's path.
if ! command -v dart &> /dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion examples/codelabs
24 changes: 12 additions & 12 deletions examples/cookbook/effects/shimmer_loading/lib/original_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class Shimmer extends StatefulWidget {
ShimmerState createState() => ShimmerState();
}

// #docregion ShimmerStateAnimation
// #docregion shimmer-state-animation
class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
late AnimationController _shimmerController;

Expand All @@ -143,9 +143,9 @@ class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
super.dispose();
}
// code-excerpt-closing-bracket
// #enddocregion ShimmerStateAnimation
// #enddocregion shimmer-state-animation

// #docregion LinearGradient
// #docregion linear-gradient
LinearGradient get gradient => LinearGradient(
colors: widget.linearGradient.colors,
stops: widget.linearGradient.stops,
Expand All @@ -154,7 +154,7 @@ class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
transform:
_SlidingGradientTransform(slidePercent: _shimmerController.value),
);
// #enddocregion LinearGradient
// #enddocregion linear-gradient

bool get isSized =>
(context.findRenderObject() as RenderBox?)?.hasSize ?? false;
Expand All @@ -165,21 +165,21 @@ class ShimmerState extends State<Shimmer> with SingleTickerProviderStateMixin {
required RenderBox descendant,
Offset offset = Offset.zero,
}) {
final shimmerBox = context.findRenderObject() as RenderBox;
final shimmerBox = context.findRenderObject() as RenderBox?;
return descendant.localToGlobal(offset, ancestor: shimmerBox);
}

// #docregion shimmerChanges
// #docregion shimmer-changes
Listenable get shimmerChanges => _shimmerController;
// #enddocregion shimmerChanges
// #enddocregion shimmer-changes

@override
Widget build(BuildContext context) {
return widget.child ?? const SizedBox();
}
}

// #docregion SlidingGradientTransform
// #docregion sliding-gradient-transform
class _SlidingGradientTransform extends GradientTransform {
const _SlidingGradientTransform({
required this.slidePercent,
Expand All @@ -192,7 +192,7 @@ class _SlidingGradientTransform extends GradientTransform {
return Matrix4.translationValues(bounds.width * slidePercent, 0.0, 0.0);
}
}
// #enddocregion SlidingGradientTransform
// #enddocregion sliding-gradient-transform

class ShimmerLoading extends StatefulWidget {
const ShimmerLoading({
Expand All @@ -208,7 +208,7 @@ class ShimmerLoading extends StatefulWidget {
State<ShimmerLoading> createState() => _ShimmerLoadingState();
}

// #docregion ShimmerLoadingState
// #docregion shimmer-loading-state
class _ShimmerLoadingState extends State<ShimmerLoading> {
Listenable? _shimmerChanges;

Expand All @@ -233,12 +233,12 @@ class _ShimmerLoadingState extends State<ShimmerLoading> {
void _onShimmerChange() {
if (widget.isLoading) {
setState(() {
// update the shimmer painting.
// Update the shimmer painting.
});
}
}
// code-excerpt-closing-bracket
// #enddocregion ShimmerLoadingState
// #enddocregion shimmer-loading-state

@override
Widget build(BuildContext context) {
Expand Down
1 change: 1 addition & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
{ "source": "/go/mixin-modifier", "destination": "https://docs.google.com/document/d/1la2S1uJrNAawc1yja8hrSxFZJ0cFHnYopmaBYDLwMjg/edit?usp=sharing&resourcekey=0-br1LWMlYC63Q30VGiPtAHg", "type": 301 },
{ "source": "/go/mouse-tracker-no-longer-attaches-annotations", "destination": "https://docs.google.com/document/d/1YuOcepqZjNknAMz1si2m-jAiLT4MP28XEzBcKLHnNiA/edit", "type": 301 },
{ "source": "/go/move-mouse-tracker-to-rendering", "destination": "https://docs.google.com/document/d/1dYNOTZ4kdq6ndNHopjUlrGlGBw3W-3jMbnoNJouIYtE/edit", "type": 301 },
{ "source": "/go/move-flutter-agnostic-types", "destination": "https://docs.google.com/document/d/1qQokfeExIx3E7X_2ogFfZ4U5viBQflwVSKtlazPjgOY/edit?usp=sharing&resourcekey=0-XFum7OfSG2Nkvvq8w5QxdA", "type": 301 },
{ "source": "/go/multiple-applications", "destination": "https://docs.google.com/document/d/1alrr7qimNDazmQx5D80BSHh62V2OINO4UQ5N3HcPnmo/edit?resourcekey=0-wPs1Go9AiKR-yG0-xStuKw", "type": 301 },
{ "source": "/go/multiple-engines", "destination": "https://docs.google.com/document/d/1NwiZPWHd1te46eP2GWwIezDV9CdMQkODAMuF5kWdtLw", "type": 301 },
{ "source": "/go/multiple-flutters", "destination": "https://docs.google.com/document/d/1fdKRufqUzQvERcqNIUSq-GdabXc4k8VIsClzRElJ6KY", "type": 301 },
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"url": "https://github.com/flutter/website.git"
},
"engines": {
"node": ">=20.10.0",
"pnpm": ">=8.14.0"
"node": ">=20.12.0",
"pnpm": ">=9.1.0"
},
"packageManager": "pnpm@8.15.8",
"packageManager": "pnpm@9.1.4",
"scripts": {
"serve": "PRODUCTION=false eleventy --serve",
"build-site-for-staging": "PRODUCTION=false eleventy",
Expand All @@ -24,19 +24,19 @@
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.10",
"diff2html": "^3.4.48",
"firebase-tools": "^13.8.0",
"firebase-tools": "^13.10.2",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
"hast-util-to-text": "^4.0.2",
"html-minifier-terser": "^7.2.0",
"js-yaml": "^4.1.0",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^8.6.7",
"markdown-it-anchor": "^9.0.1",
"markdown-it-attrs": "^4.1.6",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.76.0",
"shiki": "^1.4.0"
"sass": "^1.77.3",
"shiki": "^1.6.1"
}
}
Loading

0 comments on commit b181aaf

Please sign in to comment.