Skip to content

Commit

Permalink
[sync] 2024/09/02 (cfug#1489)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe authored Sep 9, 2024
2 parents 7aefa2f + 9f61b03 commit e8e3cde
Show file tree
Hide file tree
Showing 81 changed files with 1,929 additions and 1,672 deletions.
8 changes: 4 additions & 4 deletions examples/animation/animate1/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ class _LogoAppState extends State<LogoApp> with SingleTickerProviderStateMixin {
super.initState();
controller =
AnimationController(duration: const Duration(seconds: 2), vsync: this);
// #docregion addListener
// #docregion add-listener
animation = Tween<double>(begin: 0, end: 300).animate(controller)
..addListener(() {
// #enddocregion addListener
// #enddocregion add-listener
setState(() {
// The state that has changed here is the animation object's value.
});
// #docregion addListener
// #docregion add-listener
});
// #enddocregion addListener
// #enddocregion add-listener
controller.forward();
}

Expand Down
7 changes: 5 additions & 2 deletions examples/animation/animate4/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ class LogoWidget extends StatelessWidget {

// #docregion grow-transition
class GrowTransition extends StatelessWidget {
const GrowTransition(
{required this.child, required this.animation, super.key});
const GrowTransition({
required this.child,
required this.animation,
super.key,
});

final Widget child;
final Animation<double> animation;
Expand Down
4 changes: 1 addition & 3 deletions examples/animation/implicit/container5/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import 'dart:math';

import 'package:flutter/material.dart';

const _duration = Duration(milliseconds: 400);

double randomBorderRadius() {
return Random().nextDouble() * 64;
}
Expand Down Expand Up @@ -63,7 +61,7 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
color: color,
borderRadius: BorderRadius.circular(borderRadius),
),
duration: _duration,
duration: const Duration(milliseconds: 400),
),
),
ElevatedButton(
Expand Down
4 changes: 1 addition & 3 deletions examples/animation/implicit/container6/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import 'dart:math';

import 'package:flutter/material.dart';

const _duration = Duration(milliseconds: 400);

double randomBorderRadius() {
return Random().nextDouble() * 64;
}
Expand Down Expand Up @@ -63,7 +61,7 @@ class _AnimatedContainerDemoState extends State<AnimatedContainerDemo> {
color: color,
borderRadius: BorderRadius.circular(borderRadius),
),
duration: _duration,
duration: const Duration(milliseconds: 400),
curve: Curves.easeInOutBack,
),
),
Expand Down
2 changes: 1 addition & 1 deletion examples/codelabs
Submodule codelabs updated 1080 files
4 changes: 2 additions & 2 deletions examples/layout/lakes/step3/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ButtonSection extends StatelessWidget {
@override
Widget build(BuildContext context) {
final Color color = Theme.of(context).primaryColor;
// #enddocregion button-start
// #enddocregion button-start
return SizedBox(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
Expand All @@ -117,7 +117,7 @@ class ButtonSection extends StatelessWidget {
],
),
);
// #docregion button-start
// #docregion button-start
}
// #docregion button-with-text
}
Expand Down
2 changes: 2 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@
{ "source": "/go/static-tooling-in-devtools", "destination": "https://docs.google.com/document/d/1i6ISzzSKKDiiVftTnkCCvdgXEjK2eqYlPjCOKTjnvx8/edit?resourcekey=0-uyAiZEjFplyibsAkDAqKJw#", "type": 301 },
{ "source": "/go/strategy-2022", "destination": "https://docs.google.com/document/d/e/2PACX-1vTI9X2XHN_IY8wDO4epQSD1CkRT8WDxf2CEExp5Ef4Id206UOMopkYqU73FvAnnYG6NAecNSDo9TaEO/pub", "type": 301 },
{ "source": "/go/strategy-2023", "destination": "https://docs.google.com/document/d/e/2PACX-1vRknZ4Jkc-pWSMsDDyKwMrry7k2BSL_I94JCCQrg8FiHuy4fcypkgIVFbQVKPmzDQHfd20uZf2rFiXP/pub", "type": 301 },
{ "source": "/go/string-annotation", "destination": "https://docs.google.com/document/d/18NRf-ziYvPCLr2xFoUqfRtanfZysrUvLAUz-BM_D2Ac", "type": 301 },
{ "source": "/go/studio-rasterization-context-for-multi-view", "destination": "https://docs.google.com/document/d/1Eqb8xeoRKpLq2OVkJX_ux3azVLGJgJcaY5uSWzqdc_4/edit", "type": 301 },
{ "source": "/go/subpixel-antialiasing", "destination": "https://docs.google.com/document/d/1yEycgo5ivZ_lu2MAnMBLreZvROFdamy9-9q-QvMvL9U/edit?usp=sharing", "type": 301 },
{ "source": "/go/supporting-dart-callbacks", "destination": "https://docs.google.com/document/d/1k7OimxbxXzdv3U7-TfB88yG5hIScN3TH6Jcvdcl4izM/edit", "type": 301 },
Expand Down Expand Up @@ -711,6 +712,7 @@
{ "source": "/to/review-gradle-config", "destination": "/deployment/android#review-the-gradle-build-configuration", "type": 301 },
{ "source": "/to/save-layer-perf", "destination": "/perf/best-practices#use-savelayer-thoughtfully", "type": 301 },
{ "source": "/to/state-management-sample", "destination": "/data-and-backend/state-mgmt/simple", "type": 301 },
{ "source": "/to/switch-flutter-version", "destination": "/release/upgrade/#switching-to-a-specific-flutter-version", "type": 301 },
{ "source": "/to/track-widget-creation", "destination": "/tools/devtools/inspector#track-widget-creation", "type": 301 },
{ "source": "/to/troubleshoot-devices", "destination": "/get-started/install", "type": 301 },
{ "source": "/to/unbounded-constraints", "destination": "/ui/layout/constraints#unbounded", "type": 301 },
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=20.12.0",
"pnpm": ">=9.1.0"
},
"packageManager": "pnpm@9.6.0",
"packageManager": "pnpm@9.9.0",
"scripts": {
"serve": "PRODUCTION=false eleventy --serve",
"build-site-for-staging": "PRODUCTION=false eleventy",
Expand All @@ -23,20 +23,20 @@
},
"devDependencies": {
"@11ty/eleventy": "3.0.0-beta.1",
"diff2html": "^3.4.48",
"firebase-tools": "^13.15.0",
"hast-util-from-html": "^2.0.1",
"firebase-tools": "^13.16.0",
"hast-util-from-html": "^2.0.2",
"hast-util-select": "^6.0.2",
"hast-util-to-text": "^4.0.2",
"html-minifier-terser": "^7.2.0",
"js-yaml": "^4.1.0",
"liquidjs": "10.16.4",
"markdown-it": "^14.1.0",
"markdown-it-anchor": "^9.0.1",
"markdown-it-attrs": "^4.1.6",
"markdown-it-anchor": "^9.1.0",
"markdown-it-attrs": "^4.2.0",
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"markdown-it-footnote": "^4.0.0",
"sass": "^1.77.8",
"shiki": "^1.12.1"
"shiki": "^1.14.1"
}
}
Loading

0 comments on commit e8e3cde

Please sign in to comment.