[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shiki&package-manager=npm_and_yarn&previous-version=1.6.1&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
pnpm-lock.yaml | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 681d57e60..33df44a9f 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,6 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.77.4",
- "shiki": "^1.6.1"
+ "shiki": "^1.6.2"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b9d88a615..e0b0cf30f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,8 +58,8 @@ importers:
specifier: ^1.77.4
version: 1.77.4
shiki:
- specifier: ^1.6.1
- version: 1.6.1
+ specifier: ^1.6.2
+ version: 1.6.2
packages:
@@ -375,8 +375,8 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@shikijs/core@1.6.1':
- resolution: {integrity: sha512-CqYyepN4SnBopaoXYwng4NO8riB5ask/LTCkhOFq+GNGtr2X+aKeD767eYdqYukeixEUvv4bXdyTYVaogj7KBw==}
+ '@shikijs/core@1.6.2':
+ resolution: {integrity: sha512-guW5JeDzZ7uwOjTfCOFZ2VtVXk5tmkMzBYbKGfXsmAH1qYOej49L5jQDcGmwd6/OgvpmWhzO2GNJkQIFnbwLPQ==}
'@sindresorhus/slugify@2.2.1':
resolution: {integrity: sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==}
@@ -2549,8 +2549,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@1.6.1:
- resolution: {integrity: sha512-1Pu/A1rtsG6HZvQm4W0NExQ45e02og+rPog7PDaFDiMumZgOYnZIu4JtGQeAIfMwdbKSjJQoCUr79vDLKUUxWA==}
+ shiki@1.6.2:
+ resolution: {integrity: sha512-X3hSm5GzzBd/BmPmGfkueOUADLyBoZo1ojYQXhd+NU2VJn458yt4duaS0rVzC+WtqftSV7mTVvDw+OB9AHi3Eg==}
side-channel@1.0.6:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
@@ -3355,7 +3355,7 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
- '@shikijs/core@1.6.1': {}
+ '@shikijs/core@1.6.2': {}
'@sindresorhus/slugify@2.2.1':
dependencies:
@@ -5830,9 +5830,9 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@1.6.1:
+ shiki@1.6.2:
dependencies:
- '@shikijs/core': 1.6.1
+ '@shikijs/core': 1.6.2
side-channel@1.0.6:
dependencies:
From 8a1434b8d99f67dda93dd541a5088f135734ef11 Mon Sep 17 00:00:00 2001
From: Dominik Roszkowski
Date: Mon, 3 Jun 2024 21:21:38 +0200
Subject: [PATCH 02/95] Update patterns.md with destructuring of record with
named fields (#5875)
Co-authored-by: Marya <111139605+MaryaBelanger@users.noreply.github.com>
Co-authored-by: Marya Belanger
---
examples/language/lib/patterns/destructuring.dart | 11 +++++++++++
src/content/language/patterns.md | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/examples/language/lib/patterns/destructuring.dart b/examples/language/lib/patterns/destructuring.dart
index b44ad4554..d291b5255 100644
--- a/examples/language/lib/patterns/destructuring.dart
+++ b/examples/language/lib/patterns/destructuring.dart
@@ -42,6 +42,10 @@ void main() {
return ('doug', 25);
}
+ ({String name, int age}) getData() {
+ return (name: 'doug', age: 25);
+ }
+
var json = {};
{
@@ -57,6 +61,13 @@ void main() {
var (name, age) = userInfo(json);
// #enddocregion destructure-multiple-returns-2
}
+
+ {
+ // #docregion destructure-multiple-returns-3
+ final (:name, :age) =
+ getData(); // For example, return (name: 'doug', age: 25);
+ // #enddocregion destructure-multiple-returns-3
+ }
}
{
// #docregion destructure-class-instances
diff --git a/src/content/language/patterns.md b/src/content/language/patterns.md
index 78ef57f40..12a1925c1 100644
--- a/src/content/language/patterns.md
+++ b/src/content/language/patterns.md
@@ -303,6 +303,14 @@ as its subpattern:
var (name, age) = userInfo(json);
```
+To destructure a record with named fields using a pattern:
+
+
+```dart
+final (:name, :age) =
+ getData(); // For example, return (name: 'doug', age: 25);
+```
+
### Destructuring class instances
[Object patterns][object] match against named object types, allowing
From 06d639ed8f11dc8074d893e769218314d39d1e0a Mon Sep 17 00:00:00 2001
From: Anthony Sansone
Date: Mon, 3 Jun 2024 17:32:21 -0500
Subject: [PATCH 03/95] Clarify capitalization of abbr and acronym (#5876)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Thanks for your contribution! Please replace this text with a
description of what this PR is changing or adding and why, list any
relevant issues, and review the contribution guidelines below.
Fixes #4111
---
- [ ] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [ ] This PR doesn't contain automatically generated corrections or
text (Grammarly, LLMs, and similar).
- [ ] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [ ] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
Contribution guidelines:
- See our [contributor
guide](https://github.com/dart-lang/site-www/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Code changes should generally follow the [Dart style
guide](https://dart.dev/effective-dart) and use `dart format`.
- Updates to [code
excerpts](https://github.com/dart-lang/site-shared/blob/main/doc/code-excerpts.md)
indicated by `
---------
Co-authored-by: Marya <111139605+MaryaBelanger@users.noreply.github.com>
---
src/content/effective-dart/style.md | 102 +++++++++++++++++-----------
1 file changed, 61 insertions(+), 41 deletions(-)
diff --git a/src/content/effective-dart/style.md b/src/content/effective-dart/style.md
index bf32e30bf..fc4dd4bce 100644
--- a/src/content/effective-dart/style.md
+++ b/src/content/effective-dart/style.md
@@ -22,16 +22,14 @@ code.
Identifiers come in three flavors in Dart.
-* `UpperCamelCase` names capitalize the first letter of each word, including
- the first.
+* `UpperCamelCase` names capitalize the first letter of each word, including
+ the first.
-* `lowerCamelCase` names capitalize the first letter of each word, *except*
- the first which is always lowercase, even if it's an acronym.
-
-* `lowercase_with_underscores` names use only lowercase letters,
- even for acronyms,
- and separate words with `_`.
+* `lowerCamelCase` names capitalize the first letter of each word, *except*
+ the first which is always lowercase, even if it's an acronym.
+* `lowercase_with_underscores` names use only lowercase letters,
+ even for acronyms, and separate words with `_`.
### DO name types using `UpperCamelCase`
@@ -196,12 +194,12 @@ as in the following cases:
We initially used Java's `SCREAMING_CAPS` style for constants. We
changed for a few reasons:
-* `SCREAMING_CAPS` looks bad for many cases, particularly enum values for
- things like CSS colors.
-* Constants are often changed to final non-const variables, which would
- necessitate a name change.
-* The `values` property automatically defined on an enum type is const and
- lowercase.
+* `SCREAMING_CAPS` looks bad for many cases,
+ particularly enum values for things like CSS colors.
+* Constants are often changed to final non-const variables,
+ which would necessitate a name change.
+* The `values` property defined on an enum type is const and lowercase.
+
:::
[protobufs.]: {{site.pub-pkg}}/protobuf
@@ -209,41 +207,63 @@ changed for a few reasons:
### DO capitalize acronyms and abbreviations longer than two letters like words
-Capitalized acronyms can be hard to read, and
-multiple adjacent acronyms can lead to ambiguous names.
-For example, given a name that starts with `HTTPSFTP`, there's no way
-to tell if it's referring to HTTPS FTP or HTTP SFTP.
-
-To avoid this, acronyms and abbreviations are capitalized like regular words.
+Capitalized acronyms can be hard to read,
+and multiple adjacent acronyms can lead to ambiguous names.
+For example, given an identifier `HTTPSFTP`,
+the reader can't tell if it refers to `HTTPS` `FTP` or `HTTP` `SFTP`.
+To avoid this,
+capitalize most acronyms and abbreviations like regular words.
+This identifier would be `HttpsFtp` if referring to the former
+or `HttpSftp` for the latter.
-**Exception:** Two-letter *acronyms* like IO (input/output) are fully
-capitalized: `IO`. On the other hand, two-letter *abbreviations* like
-ID (identification) are still capitalized like regular words: `Id`.
+Two-letter abbreviations and acronyms are the exception.
+If both letters are capitalized in English,
+then they should both stay capitalized when used in an identifer.
+Otherwise, capitalize it like a word.
```dart tag=good
-class HttpConnection {}
-class DBIOPort {}
-class TVVcr {}
-class MrRogers {}
-
-var httpRequest = ...
-var uiHandler = ...
-var userId = ...
-Id id;
+// Longer than two letters, so always like a word:
+Http // "hypertext transfer protocol"
+Nasa // "national aeronautics and space administration"
+Uri // "uniform resource locator"
+Esq // "esquire"
+Ave // "avenue"
+
+// Two letters, capitalized in English, so capitalized in an identifier:
+ID // "identifier"
+TV // "television"
+UI // "user interface"
+
+// Two letters, not capitalized in English, so like a word in an identifier:
+Mr // "mister"
+St // "street"
+Rd // "road"
```
```dart tag=bad
-class HTTPConnection {}
-class DbIoPort {}
-class TvVcr {}
-class MRRogers {}
-
-var hTTPRequest = ...
-var uIHandler = ...
-var userID = ...
-ID iD;
+HTTP // "hypertext transfer protocol"
+NASA // "national aeronautics and space administration"
+URI // "uniform resource locator"
+esq // "esquire"
+Ave // "avenue"
+
+Id // "identifier"
+Tv // "television"
+Ui // "user interface"
+
+MR // "mister"
+ST // "street"
+RD // "road"
```
+When any form of abbreviation comes at the beginning
+of a lowerCamelCase identifier, lowercase the identifer:
+
+```dart
+var httpConnection = connect();
+var tvSet = Television();
+var mrRogers = 'hello, neighbor';
+```
### PREFER using `_`, `__`, etc. for unused callback parameters
From 2b87002c9ed8334519efc9bf889467b2dbf4eef9 Mon Sep 17 00:00:00 2001
From: Stanislav Chernyshev
Date: Tue, 4 Jun 2024 22:48:40 +0300
Subject: [PATCH 04/95] Added new dart book (#5869)
Added information about the new book on Dart. The material is relevant
for Dart 3.4
Co-authored-by: Anthony Sansone
---
src/_data/books-dart.yml | 7 +++++++
src/content/assets/img/cover/basics-dart.webp | Bin 0 -> 8902 bytes
2 files changed, 7 insertions(+)
create mode 100644 src/content/assets/img/cover/basics-dart.webp
diff --git a/src/_data/books-dart.yml b/src/_data/books-dart.yml
index aec63bf57..09feb6eef 100644
--- a/src/_data/books-dart.yml
+++ b/src/_data/books-dart.yml
@@ -35,3 +35,10 @@
cover: o-guia-de-dart.webp
link: "https://www.casadocodigo.com.br/products/livro-dart"
desc: "Fundamentos, prática, conceitos avançados e tudo mais. Embarque neste livro que te guiará no aprendizado de Dart. Fundamentals, practice, the concepts and everything. Embark on a journey of learning Dart in Portuguese."
+- title: "Основы Dart"
+ authors:
+ - Stanislav Chernyshev
+ publisher: Издательский дом «Питер»
+ cover: basics-dart.webp
+ link: "https://www.piter.com/collection/biblioteka-programmista/product/osnovy-dart"
+ desc: "Книга «Основы Dart» адресована тем, кто интересуется этим удивительным языком программирования. Вы узнаете об истории создания, синтаксисе и особенностях языка, таких как встроенные типы данных, и многом другом. В главе 2 вас ждет проект, который будет изменяться и расти вместе с вашими знаниями и навыками, а к главе 6 преобразится в полноценное клиент-серверное приложение. После каждой новой итерации проекта, вас будут ждать предложения по внесению изменений в его кодовую базу, что позволит прокачать свои hard-скиллы. Исходный код рассматриваемых в книге примеров можно найти в GitHub-репозитории автора (весь код в книге соответствует Dart 3.4)."
diff --git a/src/content/assets/img/cover/basics-dart.webp b/src/content/assets/img/cover/basics-dart.webp
new file mode 100644
index 0000000000000000000000000000000000000000..5c2694d264b6a42b5e4ee5237e4e32fa743cba7e
GIT binary patch
literal 8902
zcmaiZbx>T-w(j5wE(rmG4iF>^Gw9&%9)bmeyUySeEJ$z$O9%w_-~1PSgo
z^Z1>2&b{}KSNC<*uDyEg@9U-2UDaDtQBJNE2mt8HN@?h52mzz9tYL>?)foz1`i)Ul<2U`1F8J)8&aij1`R+no-bW`N(x=MgF-
z;%s}ej)`$T1Y8^~WcCpy51d`0b~4&C8&Ev+ZStreXVsgT7n!qdP5%A956BCo^=#Od
z@pbEJKt5_$yzVXmm5)TsdY)HY(;bVeAOQg~$R-rsec=&m5PS=sGIpk$L$w6-q3Dj$
z?)UG&_pnjaH@d6VzJO)%tvhU#APR&+&6PaNAQ9&QIO282w{25M)B{0)9P$Pgb%xr+
z7{e&0J81fWL@l?)v=QAg-+jIey+m@{{y@@=8E+e#BQG9uFRQPJ9<0|#cZG+ql^?)G
zFV;~5ZA~b{hjwJ|U1G1XjVPeS_?G1wc5K{8w<@M6midsJ6<`?f8)@PP2w*~nA@NQV
z?`BY_BGj&z2NL4}`WNRH&S}M-@mgCsaw?$uHUhbVRKFSRCvp~72xvi(+|XST-6!9m
zZj295TLH%bi6|7R`Y;g%YZzS+w+NW5xHXHiN9iIf9*iarRonk`EA{_)_QQ1K*C)d?
zEe?&p_~ex4W47G&&VDgvO{Zv20t*ubthixh3S!nq>E~$#8s8<}50_SaWAMSyx2TeQ
z@`{i2Bys6ofC!lgul?8cHK#wXJPcbpZWLI2Z9y~VmAUM~+@FB2CF)&r&>9{B(4TIeYZUeeBFa;A{#ubGMVreK?wZsg;Gh&E#c<{EnS)7?d)md;
z`t8KA>>ZYgA`^VF&DebAhXqT*uz_(KS7b!W%xEW%rOV=(8N$KFU8&By<0Iv*h%o6x
z!IC|k+*gbG{b*@{q9R7HKI&YoUd(}ie$0VrLGo0vkyPZ`L5$G5;=QN+_9D9({N`1vX^vYj2+GcIikVE^cYJQI};xmEuMYBn@64X#w=`MVC!;;Cc+z80+hZ$xh~7=A!f>OK7e1Mdoirk~IIP4DT(vsCajHJ;kBe
z+pK_)+@5#PUmD7KBu&4b8o6>MdNhc@U#A;@e$TiI=@UG>+u`j2xZ3B*0rY<8#fHpc
z2&w=8NTkIA>h4RXV#chv0Sa}X(r|vZan%LD+N`R<@4%1OwWOpMvGv?=z`8m+Nz-%HV(7Zs)NwpFV3k6M*R6lYhc&rJzkX
zpEfQqva`JLy+zoj6#-)DWGG}H#qYP{*!ca5y>1Qf44?nu({4x8z--31*#14u@nc@C
z-l}!`6Xeuxtkx6j%DkD)?k{xrT@dtZ#*lbM3Smw<4{vRd4@|3O9x>S?mIW43<^LJ-
z{b1nlb8_|8B-7CcdQ_Y3zGYv
z+(KR@JG`Zm%48xToTM9kDt`S^$E5yggK%k)HjA*aji8sM;5uM1@jh1+($uc4dWMaG3HZ8ff@2{9N&&ri=iS!LJII1)9gkUt?^uuVVD
z9Dmk5zP$x3F)-8-mr)gcDH4R*zY=}@Y~%XXuTDs}O`7xbX-<*!<{bWXJvTR2reibW
z%ao_ISp*uv3rkgsolUq!FKMr^mdqY#8?Z9btt&@pf`V_t8bru9S$@pDl$CQmt)d*g
z8rm`toq5uE#mc8bOBY)`SLFeMGZt{<(%qG1^Mq;VGo9_7urtOXIW_-iW8E5uvd;{rh9T?`@^Ur#z|HO
zzsxNJ*6-V|(K$CbGMeGbj?w0_xl>h_it{?^CynE_u$8wYt_=v;nbp@oPx7se~Cq`cpJkv6Er!&2=
zqj7q8k;QcHNMVPE{@zB4f(-~dku)Z|$x1hQ>PYP-T^0TALzvzUHD$1&PS*0o*1*=zVx5pYod80emrLL2E}D{*CzV;;xCT5
zw?p1X`fUw)1$U!+N`SgwK4e7M#QK2YXLMSwor^pVhNOS!yo|8B)y!Vp{BQ~C#?|ZW
z8`;NiaVEu
zg8Nn=9XmkkX%!R_wynA_cHYQg!?Ze~kJI=uf4}rb
zhu+0uQrI@yDXsjhMOyk$vA=^YmH8}6kg-QidzCA5ho${W#vHsXYm|L$(alE$NyR!`
zUTAM5b5v1q{MCaKmvp3xF4j@MFCjTwa9(uDLOWnl(5*H>xl}E|s_7|g8aN#izB;X%
zTW0`$6E0UjB-5wQoU-yoEpSr?{hfJyNA9?^oi&vD+TDICa0)?{>dzXJ>#%
zWg(9~{@UuDv@4eTP`Qjnlt3lHshEaEAuTaL(^9EE*6<=MJT){5GipLl!Dv8k%dpd01`9d(P^0;y^r@GGM!({254QtYsNUO@Q=^-lqn4V0#T`tp85f23H@o@n#z9*tRz>|XMY
zqQBj&no$L@C0-Mrg6kJzJ<6L)ntO#P|2{3<_(tpXbs{nyE+ZlGW~VDEYB-FDP5i2U
zJ7A4Efy#MI=(+Uve)C{!gm)Y%`OdRF9EKwesWug!3RRhCyBvM1o~IZ&{L>s~`2}p3
zei_WSlgC-+@Qm}EK>2GSu>?)bx*!nVZ#1{9k*E+`%|bzBPcIbhAAkrn!-t;EI`3jAXABrYVwc
z_h_>t!p@kW;HmGFzOq?@$BnRT0llsS4ErrkPYMl;lmP+l4c~&e2NR)<
zbUzPAbM5#>@88dAmh-1Vb*GAierJTP&8=}iX`89#(@iz-BU2%;Vd`$YOuDh!yx4VY
zN?w*v*Rdx5*!Pz6$4<)b`21T7M}mcyXtb%cF*YjPcCYZK$+!b-i(ecz+LLvBArd3@ny$?f^Po
zmEd4b-Nq~LwT!#O;@7d6|z8|K%V-Pd}g{Y;^K+YhEORzN%CNq!f!X2
zxfmZv2gMg}e;t2pvNlp~Ybbbi-S4~-^j$1uSI=b@{;~8)@$Isf;S>21liz6f@uz-V
zTV!$Nw;bGGR89HfY5nqd$W3?+J|ac=NeWcIs_+)`HS^L&oit3882Yj*1$BeuPC?v29PhWla;wsatCPat`-J=qmT43Wtw{t)X2{f;|Tu&^k9(X#9d09
zy1tv{gd2hSWB)wSYD_1z-a%uxJB@s?$Q8*8Ghb|eS$E2>dqbm|D66XR@xuu6*vPM!
z;^#=0_}U9j+BDs2`_sC=ldL`{OzMEj^xN$?+`SXpVGpkJ*%x3#)V+RBMa4<{NV)jt
zj9(uxkIC1a#9Sh@)!&Jaj0^aBu(=Ht5lZk8w$a`F+%XL8Joxwar-^ap%J<;!zMS&7
z_`%JHF#DW=&k7kj&{x8IBTFn+*;N)}*QofT6V22_*q}1Lt`@O2@2mf{(
zmFyq7-4PkFTArU7oso@GP-1AbpV(WM!KG{;hbf28Wt|Nm7+mqkvduoj?2`j)oeM7N
z9JXV<6gZUkya1xn=2i~ZVy~gpAkOUOn5PDZ6;O^;N)3-f%{>sITx?u;E@(aA!WUW1
zZ)z^I3rbryRw-?HMt%3(7$7m6Epbq#K{ti7gPSqT1mp08hPdv$F)l6V7ql-s8;Kb5
z&jpKCm`8%DXv!;u-#|kNrLjpxd}6X0)#VBtTwmyr&!2dCUc&ktgeX_J(sfVdy@P$R
zom|*IHIZ3le=fAKi*?A+c>c3t^zcn}m_np_Y0uBsWEOtR-eL-PuN`ZX1SNJlG9YXc
zUaQifab}k2+dogk72pvf+Zi&x`Ahx8g4;%7p$w~C&ksK}y>!<0bNzYL{l4Os4&wvi
za7d=|($~P(81U!Sc4c0L?cP*HTi&>g%10gDbe7OG=Cb!VJ%sCm_th>M0)ItNvHG6I
z=nm(SQJaY31rFbm&aCqkv|j@esZPr4Tn~7o3--Jp)J>^-qC%V~Fmw8u3i}?a+rP=X
zzO1dyg}o|@!A$Ti$QCx5#2`-ox-W`7&U#9r#i}#Ur#;?j;}+{KCD>+4My6&4BTr{e
zQe2Uk;jj#H)^U-zZoOy2ckZ?ii^6_<*)F}{n&A2%?+np+=is?g1x{Y!f$GXGR)~^Am|;wJ
zfiLWy#eBqp8wObJw31tWqxkzgv&PdP)hp=OybUu0=D#n3~A`_GYi%^m*P!u
zAwL;gd7g?s-CLSJeHE~dGhqEm_yTlqFsEv;87hJDW@5~={@6O%Sh{WUY-`ka!JsXc~t=`0f
z_!wDInBt(2s{uj{<|widiQ&<=%cg-{rYLnB$IWK%gs0O0Q7|=cQN-U0;|;;H#fe#n
z?tHGYZdXiEMG;wF8K)hZY%F#Hn`R7KzJ-EK`#m4Suxy<<4)IW#Ria{B>s1=6>}+iy
zm71DWA?`TC?67*rR%$(>(gJTA$XAjm(N{usDsQQmUX3EN<1zwyHHaTME$gUea@jQ!
zho&di{|c5a4od7;rpu>@KBHzAKCZbwmu|$0l(s@$F%!m1$dk?pElw5rI2&3X;p+1b
z;9$@#-hd(&ijGLOPSI&3_}|$ev--NZ7)U`9g8uvQD0M
z+e^YtWe>v{OmCkHWy2{etPZ}Pn@?s07hb1xW-qz+y(_+77cb}6qb8-{i1j_UV!V5@
zuB0h%b!o@3)J}owHxnZbQGt~qv>@-a`r^b_j@RLRm02uk5~I}^lxJI{?kCNWrnNY|
ztKFl5Kcfk`qgQ_P7k6LpjQPGKbf;l7anIPcmtHG1^C8lNFdp1D->*JJY)*Y0$#}(+
zNRzy-%^2(kB2h0M#;wCKTWk!{#H%{4?7-AEPeW|j%V~b+OiI?Y|Jr_b5oJy{Li5HXIvdL2
z$Db`WM)$f%s&tCcDtFlTo-=>z@lEYzxW4Yd4#_AZ#VGjpxyv&rJ|YwqS^nnt(Mi=0
zBuPtndZK=*bLvVwbd@L-TWv9heYS_i0moMM{(OB1WTaP|votWS$Oa2Z?}k&j`9x=U
z=lEFp6gWHU4^Gz$=(MmFjCigtUZdCZ%`<}J#;uLgtfH)B9~cbidHu|yWkNK&g?()$
zYKJmP>ZCs48o7Q6VtB<)=*SvXxXU+qeYP0b;!C?BmR(p2q(oRgwWj=!O
zQojCWy->S+i}DCknxJf{f3_?bFjQP$A&K#mN*MU(@xq6_K$UWAMi^gWWbMoQZ--C>
zMpy#pyT9oyW0Mb<&I8TI^EJlu$2@$ty8=E?l1Odh#ZWZ!?&bMY85c
zWs`-hzI9rb?D)p7;vwMZOFVy)+}*ttW_qs6+eGR_wFd3G1s6do-jgCgd9ajr|1Dm>
zFfRGY{vUJ(L5fKhCAKqiYzMjmR^v`Vi(BORj$S_tE}k1W*a9;@JgA|da^_k%f>wO~
zP2>B?2@6fJ4G_!6K-}xAK0YM-$JhJYHPO%cRf@2aE(;0d
zL4NF8Bm=ZN=tYyCY<=uq7&N=C`I4h@zpODavW=s#jokqITTK+pZw6?_0tmj}H@R6i
z6dfD{rS!NIQE_kz4;suPn)$L&@cJ$&**s_GSyv0%yFEkseGEtQrEB9e*Bf2?EjqeW
zfI{0AQQFr=dI~S!t`QeQ+N(Ij(M=qp=M`M7haH*|&cst!108R=^5^Z%!U{>(64iqv%lO$X&Y^NEt=8zM{6krnB5Iut5-bb6m5@JA)*NNL+bD^o{6c|?G4K-OElH1f
z!b#Ble4;O>QWOm?!yhCQ_Ol^XnHj{^`G7OkPhpAL$f&Kjtfxg7T2pEA3<6UTVJc>p
z{Gp}Y+nC<(4er_u-J<*W^t{Y*JSKoq1Tm+Y5_fsOo0)X1dW9}xypD)NLZ>op<8Iz8
zz5bdQvhKcNJ6~p`0ExbuC7X9L^DDO-DSR#g^=LV1uNW_5R5X(jZ)
zrm(Xk?QRfb3Z*e;GX$KnAT5tF#$WO;X1>H#s^87Mo(=v`zhLb7s%6Bn2W?`G$zLCb
zqL$j^&sZqIhbTvHw_lAt6bs$sOG@G;!h^B8!mrJySLG
zV%%2`yJc6Mkv#c@q}I}J&?M}dY{Geqz8W3^TxK}PCu~a1exfa!8`z_UYjD8%{!rR+
z9X^o9o0lthvGDt*JC?w3z0A?(3>yIyuL7@Vw4@zVp7N;8?$q)3yTY;(hs^FKhJN<+
z!07JHlkj}6J&8==d2<{mkPyQGcf?x0m7IL3(YiFk7F+xSHEjfnP{g-#JvY3GQw`)V
z8Ke}xE)_wq_Weq#xQzH+;hd$aVyf4#Y+g_gd;NLc_k1Sq+c2AN6*g;&28%jt*%65=
zTKKSZOP}J%(oV$=dOpb)rx~gw8??flFK$h8%
ze2RZMoP;L7<52rgh-%h#6t@RjysvxMq{w|ca$WMUVB7}6t1R_L$qPDeBh5(}^oX%>D?w+>s2mN*H4FD%G
z4uGkZk^7});c18s<$(#2g`CUAN8^;B)OaFR0D=AZek4y8fkd^h$0ux1VO^J2DIg1%
zf$CFbVCCeF4R)&Yiuaa6&$(jeCRG#}~Tp)wdW&IrN>c&;4gm!S2c;ktMatg;DqnE!+a)BsoG!;V9
z%q8+-8{J{A*eu<-hbW~Sukg74Tqjey#l+h#*7Vruk51V)yQnp!>7`i#3e0yiU=c
z`vs44FClL6SqBIbo0`bzmo!+F-wP-zb2S^*X)k
zrXAuJEW}{y#0ND={@W{kJ@P%mt-q8L!YwVm-FCQ;bhfDR
zap+2*esJSxxih%BmfrAmOm^}j)`*VO68Eb*8^&B@P+$LYGDu~b@M6ka?YF7xUD2Jm
zA-|p7Ol&-EOn0Pj5zwh81k{U&)Sj-FUbP7Px=UeB{-ZGM
z$=fkC!!JppaAx6rCVfZ*RT=U(%jZ4pMd!%k8=646#A_Rk0`v@XC2eCwr-$T;vm2Tz
zKq+RMV%{yyir*&i>m~`}arXtt>M6<*KfV0;|)`M4><9O?g+8X?>N
zVV+-3hFd^TPEL}WPX@vVk(8B_fy(jmN%28=r1|+J1%UtNSp1K0|GymYqjB&*b^IT7
c{g3LgS^g3Kt4$v#|JCT0PLJK~^4P}z2N;e03IG5A
literal 0
HcmV?d00001
From dc7c42c1fc8f0b58a5997554fd5aa3fc737e55da Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 5 Jun 2024 09:13:08 -0500
Subject: [PATCH 05/95] Bump github/codeql-action from 3.25.7 to 3.25.8 (#5895)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3.25.7 to 3.25.8.
Changelog
See the releases
page for the relevant changes to the CodeQL CLI and language
packs.
Note that the only difference between v2 and
v3 of the CodeQL Action is the node version they support,
with v3 running on node 20 while we continue to release
v2 to support running on node 16. For example
3.22.11 was the first v3 release and is
functionally identical to 2.22.11. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.
[UNRELEASED]
No user facing changes.
3.25.8 - 04 Jun 2024
Update default CodeQL bundle version to 2.17.4. #2321
3.25.7 - 31 May 2024
We are rolling out a feature in May/June 2024 that will reduce the
Actions cache usage of the Action by keeping only the newest TRAP cache
for each language. #2306
3.25.6 - 20 May 2024
Update default CodeQL bundle version to 2.17.3. #2295
Avoid printing out a warning for a missing on.push
trigger when the CodeQL Action is triggered via a
workflow_call event. #2274
The tools: latest input to the init Action
has been renamed to tools: linked. This option specifies
that the Action should use the tools shipped at the same time as the
Action. The old name will continue to work for backwards compatibility,
but we recommend that new workflows use the new name. #2281
3.25.4 - 08 May 2024
Update default CodeQL bundle version to 2.17.2. #2270
3.25.3 - 25 Apr 2024
Update default CodeQL bundle version to 2.17.1. #2247
Workflows running on macos-latest using CodeQL CLI
versions before v2.15.1 will need to either upgrade their CLI version to
v2.15.1 or newer, or change the platform to an Intel MacOS runner, such
as macos-12. ARM machines with SIP disabled, including the
newest macos-latest image, are unsupported for CLI versions
before 2.15.1. #2261
3.25.2 - 22 Apr 2024
No user facing changes.
3.25.1 - 17 Apr 2024
We are rolling out a feature in April/May 2024 that improves the
reliability and performance of analyzing code when analyzing a compiled
language with the autobuildbuild
mode. #2235
Fix a bug where the init Action would fail if
--overwrite was specified in
CODEQL_ACTION_EXTRA_OPTIONS. #2245
3.25.0 - 15 Apr 2024
The deprecated feature for extracting dependencies for a Python
analysis has been removed. #2224
... (truncated)
Commits
2e230e8
Merge pull request #2323
from github/update-v3.25.8-18b06dd1d
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3.25.7&new-version=3.25.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 91d6cbf8c..068f06167 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f
+ uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f
+ uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f
+ uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 6fdef2548..06bfbfcfa 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -49,6 +49,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f
+ uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
with:
sarif_file: results.sarif
From 85740665f1f03f006e9cf216d974993c2d4b4ec5 Mon Sep 17 00:00:00 2001
From: Anthony Sansone
Date: Thu, 6 Jun 2024 08:11:05 -0500
Subject: [PATCH 06/95] Fix factory constructor example (#5889)
Fixes #5615
Fixes #5616
---
src/content/codelabs/dart-cheatsheet.md | 205 ++++++++++++------------
1 file changed, 103 insertions(+), 102 deletions(-)
diff --git a/src/content/codelabs/dart-cheatsheet.md b/src/content/codelabs/dart-cheatsheet.md
index 99b83bfd4..7f8f50ba8 100644
--- a/src/content/codelabs/dart-cheatsheet.md
+++ b/src/content/codelabs/dart-cheatsheet.md
@@ -1,6 +1,6 @@
---
-title: Dart cheatsheet codelab
-description: Interactively learn (or relearn) some of Dart's unique features.
+title: Dart cheatsheet
+description: Learn some of Dart's unique features through DartPad
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
---
@@ -11,7 +11,7 @@ but it has a few unique features.
This codelab walks you through
the most important of these language features.
-The embedded editors in this codelab have partially completed code snippets.
+The embedded editors in this cheatsheet have partially completed code snippets.
You can use these editors to test your knowledge by completing the code and
clicking the **Run** button. The editors also contain thorough test code;
**don't edit the test code**, but feel free to study it to learn about testing.
@@ -114,12 +114,12 @@ int? a; // The initial value of a is null.
To learn more about null safety in Dart,
read the [sound null safety guide](/null-safety).
-
### Code example {:.no_toc}
-Try to declare two variables below:
-- A nullable `String` named `name` with the value `'Jane'`.
-- A nullable `String` named `address` with the value `null`.
+Declare two variables in this DartPad:
+
+* A nullable `String` named `name` with the value `'Jane'`.
+* A nullable `String` named `address` with the value `null`.
Ignore all initial errors in the DartPad.
@@ -157,7 +157,6 @@ void main() {
-
## Null-aware operators
Dart offers some handy operators for dealing with values that might be null. One is the
@@ -1180,9 +1179,10 @@ void main() {
## Exceptions
-Dart code can throw and catch exceptions. In contrast to Java, all of Dart's exceptions are unchecked
-exceptions. Methods don't declare which exceptions they might throw, and you aren't required to catch
-any exceptions.
+Dart code can throw and catch exceptions.
+In contrast to Java, all of Dart's exceptions are unchecked.
+Methods don't declare which exceptions they might throw and
+you aren't required to catch any exceptions.
Dart provides `Exception` and `Error` types, but you're
allowed to throw any non-null object:
@@ -1273,12 +1273,17 @@ abstract class Logger {
}
void tryFunction(VoidFunction untrustworthy, Logger logger) {
- // Invoking this method might cause an exception.
- // TODO: Catch and handle them using try-on-catch-finally.
- untrustworthy();
+ try {
+ untrustworthy();
+ } on ExceptionWithMessage catch (e) {
+ logger.logException(e.runtimeType, e.message);
+ } on Exception catch (e) {
+ logger.logException(e.runtimeType);
+ } finally {
+ logger.doneLogging();
+ }
}
-
// Tests your solution (Don't edit!):
class MyLogger extends Logger {
Type? lastType;
@@ -1755,17 +1760,19 @@ class Shape {
### Code example {:.no_toc}
-Fill in the factory constructor named `IntegerHolder.fromList`,
-making it do the following:
+Replace the line `TODO();` in the factory constructor
+named `IntegerHolder.fromList` to return the following:
* If the list has **one** value,
- create an `IntegerSingle` with that value.
+ create an `IntegerSingle` instance using that value.
* If the list has **two** values,
- create an `IntegerDouble` with the values in order.
+ create an `IntegerDouble` instance using the values in order.
* If the list has **three** values,
- create an `IntegerTriple` with the values in order.
+ create an `IntegerTriple` instance using the values in order.
* Otherwise, throw an `Error`.
+If you succeed, the console should display `Success!`.
+
```dartpad
class IntegerHolder {
IntegerHolder();
@@ -1778,107 +1785,99 @@ class IntegerHolder {
class IntegerSingle extends IntegerHolder {
final int a;
- IntegerSingle(this.a);
+
+ IntegerSingle(this.a);
}
class IntegerDouble extends IntegerHolder {
final int a;
final int b;
- IntegerDouble(this.a, this.b);
+
+ IntegerDouble(this.a, this.b);
}
class IntegerTriple extends IntegerHolder {
final int a;
final int b;
final int c;
- IntegerTriple(this.a, this.b, this.c);
-}
+ IntegerTriple(this.a, this.b, this.c);
+}
-// Tests your solution (Don't edit!):
+// Tests your solution (Don't edit from this point to end of file):
void main() {
final errs = [];
- bool _throwed = false;
- try {
- IntegerHolder.fromList([]);
- } on UnimplementedError {
- print('Test failed. Did you implement the method?');
- return;
- } on Error {
- _throwed = true;
- } catch (e) {
- print('Called IntegerSingle.fromList([]) and got an exception of \n type ${e.runtimeType}.');
- return;
+ // Run 5 tests to see which values have valid integer holders
+ for (var tests = 0; tests < 5; tests++) {
+ if (!testNumberOfArgs(errs, tests)) return;
}
-
- if (!_throwed) {
- errs.add('Called IntegerSingle.fromList([]) and didn\'t throw Error.');
- }
- try {
- final obj = IntegerHolder.fromList([1]);
-
- if (obj is! IntegerSingle) {
- errs.add('Called IntegerHolder.fromList([1]) and got an object of type \n ${obj.runtimeType} instead of IntegerSingle.');
- } else {
- if (obj.a != 1) {
- errs.add('Called IntegerHolder.fromList([1]) and got an IntegerSingle with \n an \'a\' value of ${obj.a} instead of the expected (1).');
- }
- }
- } catch (e) {
- print('Called IntegerHolder.fromList([]) and got an exception of \n type ${e.runtimeType}.');
- return;
+ // The goal is no errors with values 1 to 3,
+ // but have errors with values 0 and 4.
+ // The testNumberOfArgs method adds to the errs array if
+ // the values 1 to 3 have an error and
+ // the values 0 and 4 don't have an error
+ if (errs.isEmpty) {
+ print('Success!');
+ } else {
+ errs.forEach(print);
}
+}
+bool testNumberOfArgs(List errs, int count) {
+ bool _threw = false;
+ final ex = List.generate(count, (index) => index + 1);
+ final callTxt = "IntegerHolder.fromList(${ex})";
try {
- final obj = IntegerHolder.fromList([1, 2]);
-
- if (obj is! IntegerDouble) {
- errs.add('Called IntegerHolder.fromList([1, 2]) and got an object of type \n ${obj.runtimeType} instead of IntegerDouble.');
- } else {
- if (obj.a != 1) {
- errs.add('Called IntegerHolder.fromList([1, 2]) and got an IntegerDouble \n with an \'a\' value of ${obj.a} instead of the expected (1).');
- }
-
- if (obj.b != 2) {
- errs.add('Called IntegerHolder.fromList([1, 2]) and got an IntegerDouble \n with an \'b\' value of ${obj.b} instead of the expected (2).');
- }
- }
+ final obj = IntegerHolder.fromList(ex);
+ final String vals = count == 1 ? "value" : "values";
+ // Uncomment the next line if you want to see the results realtime
+ // print("Testing with ${count} ${vals} using ${obj.runtimeType}.");
+ testValues(errs, ex, obj, callTxt);
+ } on Error {
+ _threw = true;
} catch (e) {
- print('Called IntegerHolder.fromList([1, 2]) and got an exception \n of type ${e.runtimeType}.');
- return;
+ switch (count) {
+ case (< 1 && > 3):
+ if (!_threw) {
+ errs.add('Called ${callTxt} and it didn\'t throw an Error.');
+ }
+ default:
+ errs.add('Called $callTxt and received an Error.');
+ }
}
+ return true;
+}
- try {
- final obj = IntegerHolder.fromList([1, 2, 3]);
-
- if (obj is! IntegerTriple) {
- errs.add('Called IntegerHolder.fromList([1, 2, 3]) and got an object of type \n ${obj.runtimeType} instead of IntegerTriple.');
+void testValues(List errs, List expectedValues, IntegerHolder obj,
+ String callText) {
+ for (var i = 0; i < expectedValues.length; i++) {
+ int found;
+ if (obj is IntegerSingle) {
+ found = obj.a;
+ } else if (obj is IntegerDouble) {
+ found = i == 0 ? obj.a : obj.b;
+ } else if (obj is IntegerTriple) {
+ found = i == 0
+ ? obj.a
+ : i == 1
+ ? obj.b
+ : obj.c;
} else {
- if (obj.a != 1) {
- errs.add('Called IntegerHolder.fromList([1, 2, 3]) and got an IntegerTriple \n with an \'a\' value of ${obj.a} instead of the expected (1).');
- }
-
- if (obj.b != 2) {
- errs.add('Called IntegerHolder.fromList([1, 2, 3]) and got an IntegerTriple \n with an \'a\' value of ${obj.b} instead of the expected (2).');
- }
-
- if (obj.c != 3) {
- errs.add('Called IntegerHolder.fromList([1, 2, 3]) and got an IntegerTriple \n with an \'a\' value of ${obj.b} instead of the expected (2).');
- }
+ throw ArgumentError(
+ "This IntegerHolder type (${obj.runtimeType}) is unsupported.");
}
- } catch (e) {
- print('Called IntegerHolder.fromList([1, 2, 3]) and got an exception \n of type ${e.runtimeType}.');
- return;
- }
- if (errs.isEmpty) {
- print('Success!');
- } else {
- errs.forEach(print);
+ if (found != expectedValues[i]) {
+ errs.add(
+ "Called $callText and got a ${obj.runtimeType} " +
+ "with a property at index $i value of $found " +
+ "instead of the expected (${expectedValues[i]}).");
+ }
}
}
+
```
@@ -1888,17 +1887,18 @@ void main() {
check the length of the list, then create and return an
`IntegerSingle`, `IntegerDouble`, or `IntegerTriple` as appropriate.
- ```dart
- factory IntegerHolder.fromList(List list) {
- if (list.length == 1) {
+ Replace `TODO();` with the following code block.
+
+ ```dart
+ switch (list.length) {
+ case 1:
return IntegerSingle(list[0]);
- } else if (list.length == 2) {
+ case 2:
return IntegerDouble(list[0], list[1]);
- } else if (list.length == 3) {
+ case 3:
return IntegerTriple(list[0], list[1], list[2]);
- } else {
- throw Error();
- }
+ default:
+ throw ArgumentError("List must between 1 and 3 items. This list was ${list.length} items.");
}
```
@@ -2084,9 +2084,10 @@ void main() {
## What's next?
-We hope you enjoyed using this codelab to learn or test your knowledge of
+We hope you enjoyed using this cheatsheet to learn
some of the most interesting features of the Dart language.
-Here are some suggestions for what to do now:
+
+What you can try next includes:
* Try [other Dart codelabs](/codelabs).
* Read the [Dart language tour](/language).
From b4f0968c6dc96917f34357faf6f1547285da3d46 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 7 Jun 2024 10:25:09 -0500
Subject: [PATCH 07/95] Bump firebase-tools from 13.10.2 to 13.11.1 (#5900)
---
package.json | 2 +-
pnpm-lock.yaml | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package.json b/package.json
index 33df44a9f..2aee98678 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"devDependencies": {
"@11ty/eleventy": "3.0.0-alpha.10",
"@11ty/eleventy-img": "5.0.0-beta.4",
- "firebase-tools": "^13.10.2",
+ "firebase-tools": "^13.11.1",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
"hast-util-to-text": "^4.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e0b0cf30f..0878f428a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,8 +19,8 @@ importers:
specifier: 5.0.0-beta.4
version: 5.0.0-beta.4(encoding@0.1.13)
firebase-tools:
- specifier: ^13.10.2
- version: 13.10.2(encoding@0.1.13)
+ specifier: ^13.11.1
+ version: 13.11.1(encoding@0.1.13)
hast-util-from-html:
specifier: ^2.0.1
version: 2.0.1
@@ -1214,8 +1214,8 @@ packages:
resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==}
engines: {node: '>= 0.8'}
- firebase-tools@13.10.2:
- resolution: {integrity: sha512-vdD2//pncVg0jf2Wxo4jNJVxOiS4yJE7lx60H0xONkVW4P+hg4xe7y0O+RxOzajw4hbrUq4geyRZDQK1VlIKuw==}
+ firebase-tools@13.11.1:
+ resolution: {integrity: sha512-n+x0QmzSPVGPbDd9zrobpgQX8H4RNRjvlNAZlmnU3MEviNxRctv0up3mZvNingd47tH1Rf8MYo1yAFQw6er9Ww==}
engines: {node: '>=18.0.0 || >=20.0.0'}
hasBin: true
@@ -4249,7 +4249,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- firebase-tools@13.10.2(encoding@0.1.13):
+ firebase-tools@13.11.1(encoding@0.1.13):
dependencies:
'@google-cloud/cloud-sql-connector': 1.3.0(encoding@0.1.13)
'@google-cloud/pubsub': 4.4.0(encoding@0.1.13)
From 23fd8ec88c08245e6c67ae9e841ee86854daac9e Mon Sep 17 00:00:00 2001
From: Marya <111139605+MaryaBelanger@users.noreply.github.com>
Date: Fri, 7 Jun 2024 11:29:07 -0700
Subject: [PATCH 08/95] Glossary entries for "Subtype" and "Subclass" (#4958)
Fixes #4784
---------
Co-authored-by: Anthony Sansone
Co-authored-by: Parker Lougheed
---
src/content/resources/glossary.md | 57 +++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/src/content/resources/glossary.md b/src/content/resources/glossary.md
index 952e212d2..ead48da00 100644
--- a/src/content/resources/glossary.md
+++ b/src/content/resources/glossary.md
@@ -279,3 +279,60 @@ If not, the pattern _refutes_, or denies, the match.
Refutable patterns appear in [_matching contexts_][].
[_matching contexts_]: /language/patterns#matching
+
+## Subclass
+
+A _subclass_ is a class that inherits the implementation of another class by using the
+[`extends`](/language/extend) keyword, or by [mixin application](#mixin-application).
+
+```dart
+class A extends B {} // A is a subclass of B; B is the superclass of A.
+
+class B1 extends A with M {} // B1 has the superclass `A with M`, which has the superclass A.
+```
+
+A subclass relation also implies an associated [subtype](#subtype) relation.
+For example, `class A` implicitly defines an associated type `A`
+which instances of the class `A` inhabit.
+So, `class A extends B` declares not just that the class
+`A` is a subclass of `B`, but also establishes that the *type* `A` is a
+*subtype* of the type `B`.
+
+Subclass relations are a subset of subtype relations.
+When the documentation says "`S` must be a subtype of `T`",
+it's fine for `S` to be a subclass of `T`.
+However, the converse is not true: not all subtypes are subclasses.
+See the [subtype](#subtype) entry for more information.
+
+## Subtype
+
+A _subtype_ relation is where a value of a certain type is substitutable
+where the value of another type, the supertype, is expected.
+For example, if `S` is a subtype of `T`,
+then you can substitute a value of type `S`
+where a value of type `T` is expected.
+
+A subtype supports all of the operations of its supertype
+(and possibly some extra operations).
+In practice, this means you can assign the value of a subtype
+to any location expecting the supertype,
+and all of the methods of the supertype are available on the subtype.
+
+This is true at least statically.
+A specific API might not allow the substitution at run time,
+depending on its operations.
+
+Some subtype relations are based on the structure of the type,
+like with nullable types (for example, `int` is a subtype of `int?`)
+and function types
+(for example, `String Function()` is a subtype of `void Function()`).
+
+Subtypes can also be introduced for classes by
+[implementation](/language/classes#implicit-interfaces)
+or [inheritance](/language/extend) (direct or indirect):
+
+```dart
+class A implements B {} // A is a subtype of B, but NOT a subclass of B.
+
+class C extends D {} // C is a subtype AND a subclass of D.
+```
From 653f7ea1c3a2e22d844d2da54b1a5413fb1016c1 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 10 Jun 2024 11:49:25 -0500
Subject: [PATCH 09/95] Bump shiki from 1.6.2 to 1.6.3 (#5902)
---
package.json | 2 +-
pnpm-lock.yaml | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 2aee98678..6b2f25997 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,6 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.77.4",
- "shiki": "^1.6.2"
+ "shiki": "^1.6.3"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 0878f428a..c97ebdf18 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,8 +58,8 @@ importers:
specifier: ^1.77.4
version: 1.77.4
shiki:
- specifier: ^1.6.2
- version: 1.6.2
+ specifier: ^1.6.3
+ version: 1.6.3
packages:
@@ -375,8 +375,8 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@shikijs/core@1.6.2':
- resolution: {integrity: sha512-guW5JeDzZ7uwOjTfCOFZ2VtVXk5tmkMzBYbKGfXsmAH1qYOej49L5jQDcGmwd6/OgvpmWhzO2GNJkQIFnbwLPQ==}
+ '@shikijs/core@1.6.3':
+ resolution: {integrity: sha512-QnJKHFUW95GnlJLJGP6QLx4M69HM0KlXk+R2Y8lr/x4nAx1Yb/lsuxq4XwybuUjTxbJk+BT0g/kvn0bcsjGGHg==}
'@sindresorhus/slugify@2.2.1':
resolution: {integrity: sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==}
@@ -2549,8 +2549,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@1.6.2:
- resolution: {integrity: sha512-X3hSm5GzzBd/BmPmGfkueOUADLyBoZo1ojYQXhd+NU2VJn458yt4duaS0rVzC+WtqftSV7mTVvDw+OB9AHi3Eg==}
+ shiki@1.6.3:
+ resolution: {integrity: sha512-lE1/YGlzFY0hQSyEfsZj18xGrTWxyhFQkaiILALqTBZPbJeYFWpbUhlmTGPOupYB/qC+H6sV4UznJzcEh3WMHQ==}
side-channel@1.0.6:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
@@ -3355,7 +3355,7 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
- '@shikijs/core@1.6.2': {}
+ '@shikijs/core@1.6.3': {}
'@sindresorhus/slugify@2.2.1':
dependencies:
@@ -5830,9 +5830,9 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@1.6.2:
+ shiki@1.6.3:
dependencies:
- '@shikijs/core': 1.6.2
+ '@shikijs/core': 1.6.3
side-channel@1.0.6:
dependencies:
From 84a53ab8cc9ab3f56efa299cbd4580f3a8a0dd5b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 10 Jun 2024 11:55:38 -0500
Subject: [PATCH 10/95] Bump firebase-tools from 13.11.1 to 13.11.2 (#5903)
Bumps [firebase-tools](https://github.com/firebase/firebase-tools) from
13.11.1 to 13.11.2.
Release notes
diff --git a/src/content/language/async.md b/src/content/language/async.md
index 3c06bc8d1..c7b737a8d 100644
--- a/src/content/language/async.md
+++ b/src/content/language/async.md
@@ -31,7 +31,7 @@ When you need the result of a completed Future,
you have two options:
* Use `async` and `await`, as described here and in the
- [asynchronous programming codelab](/codelabs/async-await).
+ [asynchronous programming tutorial](/libraries/async/async-await).
* Use the Future API, as described in the
[`dart:async` documentation](/libraries/dart-async#future).
@@ -117,7 +117,7 @@ use the [unawaited_futures linter rule][].
:::
For an interactive introduction to using futures, `async`, and `await`,
-see the [asynchronous programming codelab](/codelabs/async-await).
+see the [asynchronous programming tutorial](/libraries/async/async-await).
## Declaring async functions
@@ -149,7 +149,7 @@ If your function doesn't return a useful value,
make its return type `Future`.
For an interactive introduction to using futures, `async`, and `await`,
-see the [asynchronous programming codelab](/codelabs/async-await).
+see the [asynchronous programming tutorial](/libraries/async/async-await).
{% comment %}
TODO #1117: Where else should we cover generalized void?
diff --git a/src/content/language/concurrency.md b/src/content/language/concurrency.md
index 396e845ee..c4bb3d59b 100644
--- a/src/content/language/concurrency.md
+++ b/src/content/language/concurrency.md
@@ -224,9 +224,9 @@ Stream sumStream(Stream stream) async* {
```
If you'd like to learn more about using `async`, `await`, `Stream`s and
-`Future`s, visit the [asynchronous programming codelab][].
+`Future`s, check out the [asynchronous programming tutorial][].
-[asynchronous programming codelab]: /codelabs/async-await
+[asynchronous programming tutorial]: /libraries/async/async-await
## Isolates
@@ -280,7 +280,7 @@ complete. A well-behaved app starts quickly, getting to the event loop as soon
as possible. The app then responds to each queued event promptly, using
asynchronous operations as necessary.
-[async-await]: /codelabs/async-await
+[async-await]: /libraries/async/async-await
### The isolate life cycle
diff --git a/src/content/language/index.md b/src/content/language/index.md
index a8796ac62..27864e527 100644
--- a/src/content/language/index.md
+++ b/src/content/language/index.md
@@ -16,8 +16,8 @@ listed under **Language** in the left side menu.
For coverage of Dart's core libraries,
check out the [core library documentation](/libraries).
-You can also try the [Dart cheatsheet codelab](/codelabs/dart-cheatsheet),
-for a more hands-on introduction.
+You can also check out the [Dart cheatsheet](/resources/dart-cheatsheet),
+for a more interactive introduction.
## Hello World
diff --git a/src/content/language/loops.md b/src/content/language/loops.md
index c0c150bd5..2b998f7bd 100644
--- a/src/content/language/loops.md
+++ b/src/content/language/loops.md
@@ -74,7 +74,7 @@ for (final Candidate(:name, :yearsExperience) in candidates) {
:::tip
To practice using `for-in`, follow the
-[Iterable collections codelab](/codelabs/iterables).
+[Iterable collections tutorial](/libraries/collections/iterables).
:::
Iterable classes also have a [forEach()][] method as another option:
diff --git a/src/content/codelabs/async-await.md b/src/content/libraries/async/async-await.md
similarity index 98%
rename from src/content/codelabs/async-await.md
rename to src/content/libraries/async/async-await.md
index 4e101ecf3..82dab7e85 100644
--- a/src/content/codelabs/async-await.md
+++ b/src/content/libraries/async/async-await.md
@@ -6,32 +6,32 @@ js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
-This codelab teaches you how to write asynchronous code using
+This tutorial teaches you how to write asynchronous code using
futures and the `async` and `await` keywords.
Using embedded DartPad editors,
you can test your knowledge by running example code
and completing exercises.
-To get the most out of this codelab, you should have the following:
+To get the most out of this tutorial, you should have the following:
* Knowledge of [basic Dart syntax](/language).
* Some experience writing asynchronous code in another language.
-This codelab covers the following material:
+This tutorial covers the following material:
* How and when to use the `async` and `await` keywords.
* How using `async` and `await` affects execution order.
* How to handle errors from an asynchronous call
using `try-catch` expressions in `async` functions.
-Estimated time to complete this codelab: 40-60 minutes.
+Estimated time to complete this tutorial: 40-60 minutes.
:::note
This page uses embedded DartPads to display examples and exercises.
{% render 'dartpads-embedded-troubleshooting.md' %}
:::
-The exercises in this codelab have partially completed code snippets.
+The exercises in this tutorial have partially completed code snippets.
You can use DartPad to test your knowledge by completing the code and
clicking the **Run** button.
**Don't edit the test code in the `main` function or below**.
@@ -1078,13 +1078,13 @@ bool _logoutSucceeds = false;
## What's next?
-Congratulations, you've finished the codelab! If you'd like to learn more, here
+Congratulations, you've finished the tutorial! If you'd like to learn more, here
are some suggestions for where to go next:
- Play with [DartPad]({{site.dartpad}}).
-- Try another [codelab](/codelabs).
+- Try another [tutorial](/tutorials).
- Learn more about futures and asynchronous code in Dart:
- - [Streams tutorial](/tutorials/language/streams):
+ - [Streams tutorial](/libraries/async/using-streams):
Learn how to work with a sequence of asynchronous events.
- [Concurrency in Dart](/language/concurrency):
Understand and learn how to implement concurrency in Dart.
diff --git a/src/content/libraries/async/futures-error-handling.md b/src/content/libraries/async/futures-error-handling.md
index 5754111f1..6bb36607a 100644
--- a/src/content/libraries/async/futures-error-handling.md
+++ b/src/content/libraries/async/futures-error-handling.md
@@ -20,7 +20,7 @@ You don't need this page if your code uses
the language's asynchrony support:
`async`, `await`, and error handling using try-catch.
For more information, see the
-[asynchronous programming codelab](/codelabs/async-await).
+[asynchronous programming tutorial](/libraries/async/async-await).
:::
diff --git a/src/content/codelabs/iterables.md b/src/content/libraries/collections/iterables.md
similarity index 98%
rename from src/content/codelabs/iterables.md
rename to src/content/libraries/collections/iterables.md
index 6fea696c3..309c9aee4 100644
--- a/src/content/codelabs/iterables.md
+++ b/src/content/libraries/collections/iterables.md
@@ -1,42 +1,43 @@
---
title: Iterable collections
-description: An interactive guide to using Iterable objects such as lists and sets.
+description: >-
+ An interactive guide to using Iterable objects such as lists and sets.
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
---
-This codelab teaches you how to use collections that
+This tutorial teaches you how to use collections that
implement the [Iterable][iterable class] class—for example
[List][list class] and [Set.][set class]
Iterables are basic building blocks for
all sorts of Dart applications,
and you're probably already using them,
even without noticing.
-This codelab helps you make the most out of them.
+This tutorial helps you make the most out of them.
Using the embedded DartPad editors,
you can test your knowledge by
running example code and completing exercises.
-To get the most out of this codelab,
+To get the most out of this tutorial,
you should have basic knowledge of [Dart syntax](/language).
-This codelab covers the following material:
+This tutorial covers the following material:
* How to read elements of an Iterable.
* How to check if the elements of an Iterable satisfy a condition.
* How to filter the contents of an Iterable.
* How to map the contents of an Iterable to a different value.
-Estimated time to complete this codelab: 60 minutes.
+Estimated time to complete this tutorial: 60 minutes.
:::note
This page uses embedded DartPads to display examples and exercises.
{% render 'dartpads-embedded-troubleshooting.md' %}
:::
-The exercises in this codelab have partially completed code snippets.
+The exercises in this tutorial have partially completed code snippets.
You can use DartPad to test your knowledge by completing the code and
clicking the **Run** button.
**Don't edit the test code in the `main` function or below**.
@@ -1211,14 +1212,14 @@ bool isValidEmailAddress(EmailAddress email) {
## What's next
-Congratulations, you finished the codelab!
+Congratulations, you finished the tutorial!
If you want to learn more,
here are some suggestions for where to go next:
* Play with [DartPad.]({{site.dartpad}})
-* Try another [codelab](/codelabs).
+* Try another [tutorial](/tutorials).
* Read the [Iterable API reference][iterable class]
- to learn about methods not covered by this codelab.
+ to learn about methods that this tutorial doesn't cover.
[hashmap class]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-collection/HashMap-class.html
[iterable class]: {{site.dart-api}}/{{site.sdkInfo.channel}}/dart-core/Iterable-class.html
diff --git a/src/content/libraries/dart-async.md b/src/content/libraries/dart-async.md
index f0463b72a..45c45af49 100644
--- a/src/content/libraries/dart-async.md
+++ b/src/content/libraries/dart-async.md
@@ -23,7 +23,7 @@ dart:async library ([API reference][dart:async]).
You don't always need to use the Future or Stream APIs directly.
The Dart language supports asynchronous coding using
keywords such as `async` and `await`.
-Check out the [asynchronous programming codelab](/codelabs/async-await)
+Check out the [asynchronous programming tutorial](/libraries/async/async-await)
for details.
:::
@@ -101,7 +101,7 @@ function from your function.
:::
For more information on using `await` and related Dart language features,
-see the [asynchronous programming codelab](/codelabs/async-await).
+see the [asynchronous programming tutorial](/libraries/async/async-await).
### Basic usage
@@ -342,7 +342,7 @@ DOM event listeners in a row, then the second kind of event is never handled.
For more information on using `await` and related
Dart language features, see the
-[asynchronous programming codelab](/codelabs/async-await).
+[asynchronous programming tutorial](/libraries/async/async-await).
### Listening for stream data
@@ -453,11 +453,11 @@ inputStream.transform(utf8.decoder).transform(const LineSplitter()).listen(
For some examples of using Future and Stream in command-line apps,
check out the [dart:io documentation][].
-Also see these articles, codelabs, and tutorials:
+Also see these articles and tutorials:
-- [Asynchronous programming: futures, async, await](/codelabs/async-await)
+- [Asynchronous programming: futures, async, await](/libraries/async/async-await)
- [Futures and error handling](/libraries/async/futures-error-handling)
-- [Asynchronous programming: streams](/tutorials/language/streams)
+- [Asynchronous programming: streams](/libraries/async/using-streams)
- [Creating streams in Dart](/libraries/async/creating-streams)
- [Dart asynchronous programming: Isolates and event loops](/language/concurrency)
diff --git a/src/content/libraries/dart-core.md b/src/content/libraries/dart-core.md
index fbcbb5f02..7c34b4825 100644
--- a/src/content/libraries/dart-core.md
+++ b/src/content/libraries/dart-core.md
@@ -299,7 +299,7 @@ lists, sets, and maps.
:::tip
To practice using APIs that are available to both lists and sets,
-follow the [Iterable collections codelab](/codelabs/iterables).
+follow the [Iterable collections tutorial](/libraries/collections/iterables).
:::
### Lists
@@ -947,7 +947,7 @@ void main() {
The [Iterable][] and [Iterator][] classes
support sequential access to a collection of values.
To practice using these collections,
-follow the [Iterable collections codelab](/codelabs/iterables).
+follow the [Iterable collections tutorial](/libraries/collections/iterables).
If you create a class that can provide Iterators for use in for-in loops,
extend (if possible) or implement Iterable.
diff --git a/src/content/null-safety/index.md b/src/content/null-safety/index.md
index 14d2abd78..631b150a4 100644
--- a/src/content/null-safety/index.md
+++ b/src/content/null-safety/index.md
@@ -52,7 +52,7 @@ int? aNullableInt = null;
- To try some interactive examples,
try out some of the null-safety orientated examples in the
- [Dart cheatsheet](/codelabs/dart-cheatsheet).
+ [Dart cheatsheet](/resources/dart-cheatsheet).
- To learn more about null safety, check out
[Understanding null safety](/null-safety/understanding-null-safety).
diff --git a/src/content/resources/coming-from/js-to-dart.md b/src/content/resources/coming-from/js-to-dart.md
index ad5b76ffb..b11646d1a 100644
--- a/src/content/resources/coming-from/js-to-dart.md
+++ b/src/content/resources/coming-from/js-to-dart.md
@@ -1805,9 +1805,9 @@ Future asyncFunction() async {
To learn more about `Future`s and the
`async`/`await` syntax, see the
-[Asynchronous programming][] codelab.
+[Asynchronous programming][] tutorial.
-[Asynchronous programming]: /codelabs/async-await
+[Asynchronous programming]: /libraries/async/async-await
### Streams
@@ -1963,7 +1963,7 @@ Learn more about futures, streams,
and other asynchronous functionality in the
[asynchronous programming][] docs.
-[asynchronous programming]: /tutorials/language/streams
+[asynchronous programming]: /libraries/async/using-streams
## Classes
@@ -2775,11 +2775,11 @@ Some possible next steps:
* [Language tour][] to learn more about the Dart language
* [Core library documentation][] to learn about Dart's core libraries
-* [Dart codelabs][] for hands-on experience learning a variety of topics
+* [Dart tutorials][] for applied practice covering a variety of topics
* [Effective Dart][] to learn about common conventions
and guidelines when writing Dart code
[Language tour]: /language
[Core library documentation]: /libraries
-[Dart codelabs]: /codelabs
+[Dart tutorials]: /tutorials
[Effective Dart]: /effective-dart
diff --git a/src/content/resources/coming-from/swift-to-dart.md b/src/content/resources/coming-from/swift-to-dart.md
index bb3a6a508..0ee1de50e 100644
--- a/src/content/resources/coming-from/swift-to-dart.md
+++ b/src/content/resources/coming-from/swift-to-dart.md
@@ -2558,10 +2558,10 @@ Future asyncFunction() async {
}
```
-For more information and some hands-on practice,
-check out the [Asynchronous programming][] codelab.
+For more information and interactive practice,
+check out the [Asynchronous programming][] tutorial.
-[Asynchronous programming]: /codelabs/async-await
+[Asynchronous programming]: /libraries/async/async-await
### Streams
diff --git a/src/content/codelabs/dart-cheatsheet.md b/src/content/resources/dart-cheatsheet.md
similarity index 99%
rename from src/content/codelabs/dart-cheatsheet.md
rename to src/content/resources/dart-cheatsheet.md
index 7f8f50ba8..af510df64 100644
--- a/src/content/codelabs/dart-cheatsheet.md
+++ b/src/content/resources/dart-cheatsheet.md
@@ -1,6 +1,6 @@
---
title: Dart cheatsheet
-description: Learn some of Dart's unique features through DartPad
+description: Interactively learn (or relearn) some of Dart's unique features.
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
---
@@ -8,10 +8,10 @@ js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
The Dart language is designed to be easy to learn for
coders coming from other languages,
but it has a few unique features.
-This codelab walks you through
+This tutorial walks you through
the most important of these language features.
-The embedded editors in this cheatsheet have partially completed code snippets.
+The embedded editors in this tutorial have partially completed code snippets.
You can use these editors to test your knowledge by completing the code and
clicking the **Run** button. The editors also contain thorough test code;
**don't edit the test code**, but feel free to study it to learn about testing.
@@ -2084,12 +2084,12 @@ void main() {
## What's next?
-We hope you enjoyed using this cheatsheet to learn
+We hope you enjoyed using this tutorial to learn or test your knowledge of
some of the most interesting features of the Dart language.
What you can try next includes:
-* Try [other Dart codelabs](/codelabs).
+* Try [other Dart tutorials](/tutorials).
* Read the [Dart language tour](/language).
* Play with [DartPad.]({{site.dartpad}})
* [Get the Dart SDK](/get-dart).
diff --git a/src/content/tools/dartpad/index.md b/src/content/tools/dartpad/index.md
index 8ed561d24..f8d23bfad 100644
--- a/src/content/tools/dartpad/index.md
+++ b/src/content/tools/dartpad/index.md
@@ -5,7 +5,7 @@ description: The tool that lets you interactively play with Dart in a browser.
DartPad is an [open source tool]({{site.repo.dart.org}}/dart-pad)
that lets you play with the Dart language in any modern browser.
-Many pages in this site—especially [codelabs](/codelabs)—have
+Many pages in this site—especially [tutorials](/tutorials), have
[embedded DartPads](#embedding).
To open DartPad as a standalone web page, visit
the [DartPad site (dartpad.dev)][DartPad]{:target="_blank" rel="noopener"}.
@@ -105,7 +105,7 @@ You can find this SDK version at the bottom right of DartPad.
You can embed DartPad inside of web pages,
customizing it to suit your use case.
-For example, the [futures codelab][]
+For example, the [futures tutorial][]
contains multiple embedded DartPads
labeled as _examples_ and _exercises_.
@@ -115,4 +115,4 @@ For technical details on embedding DartPads, see the
[DartPad]: {{site.dartpad}}
[DartPad embedding guide.]: {{site.repo.dart.org}}/dart-pad/wiki/Embedding-Guide
[deferred loading]: /language/libraries#lazily-loading-a-library
-[futures codelab]: /codelabs/async-await
+[futures tutorial]: /libraries/async/async-await
diff --git a/src/content/tools/dartpad/troubleshoot.md b/src/content/tools/dartpad/troubleshoot.md
index 6e7d0e025..1fa5970b4 100644
--- a/src/content/tools/dartpad/troubleshoot.md
+++ b/src/content/tools/dartpad/troubleshoot.md
@@ -12,7 +12,7 @@ For an overview of DartPad, see the
## Embedded DartPads don't appear
-The dart.dev homepage and many codelabs have embedded DartPads.
+The dart.dev homepage and many tutorials have embedded DartPads.
If these DartPads don't appear at all,
then try the following:
@@ -28,7 +28,7 @@ then try the following:
If you've disabled cookies, change your settings to
**allow cookies for dartpad.dev**.
If you're using embedded DartPads,
- such as in the [Dart cheatsheet codelab](/codelabs/dart-cheatsheet) or the
+ such as in the [Dart cheatsheet](/resources/dart-cheatsheet) or the
[implicit animations codelab]({{site.flutter-docs}}/codelabs/implicit-animations),
you might need to allow cookies for the embedding site domain, as well
(in these cases, **dart.dev** and **docs.flutter.dev**, respectively).
diff --git a/src/content/tutorials/index.md b/src/content/tutorials/index.md
index 0f90d72d8..4d3eef1e3 100644
--- a/src/content/tutorials/index.md
+++ b/src/content/tutorials/index.md
@@ -5,19 +5,16 @@ description: Tutorials for writing Dart apps.
These tutorials teach you how to use the Dart
language, tools, and APIs to build applications.
-If you want a hands-on coding experience, try a
-**[codelab](/codelabs)**.
-## The basics
+## Learn the basics {:#basics}
The following tours assume a basic familiarity with the Dart language,
-which you can get from skimming the
-[language tour](/language).
-Next, learn about futures by following the
-[asynchronous programming codelab](/codelabs/async-await).
+which you can get from skimming the [language tour](/language).
+Next, to learn about futures, try the
+[asynchronous programming tutorial](/libraries/async/async-await).
Once you're familiar with the language and futures,
-learn about _streams_ and _packages_,
+learn about _iterables_, _streams_, and _packages_,
which are fundamental to most Dart programs.
@@ -34,10 +31,32 @@ which are fundamental to most Dart programs.
-## Server-side Dart tutorials
+
+## Build server-side apps {:#server}
{% include 'server-tutorials.md' %}
-## More tutorials
+
+## Keep learning
-Check out the [Flutter codelabs and tutorials]({{site.flutter-docs}}/codelabs).
+To get more experience developing with Dart,
+try more of the available tutorials!
+
+
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@11ty/eleventy&package-manager=npm_and_yarn&previous-version=3.0.0-alpha.11&new-version=3.0.0-alpha.12)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
pnpm-lock.yaml | 32 ++++++++++++++++----------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/package.json b/package.json
index 564367e2a..952b57800 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
- "@11ty/eleventy": "3.0.0-alpha.11",
+ "@11ty/eleventy": "3.0.0-alpha.12",
"@11ty/eleventy-img": "5.0.0-beta.4",
"firebase-tools": "^13.11.2",
"hast-util-from-html": "^2.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index fb487985d..86c5ec0df 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,8 +13,8 @@ importers:
version: 4.6.2
devDependencies:
'@11ty/eleventy':
- specifier: 3.0.0-alpha.11
- version: 3.0.0-alpha.11
+ specifier: 3.0.0-alpha.12
+ version: 3.0.0-alpha.12
'@11ty/eleventy-img':
specifier: 5.0.0-beta.4
version: 5.0.0-beta.4(encoding@0.1.13)
@@ -94,8 +94,8 @@ packages:
resolution: {integrity: sha512-nULO91om7vQw4Y/UBjM8i7nJ1xl+/nyK4rImZ41lFxiY2d+XUz7ChAj1CDYFjrLZeu0utAYJTZ45LlcHTkUG4g==}
engines: {node: '>=12'}
- '@11ty/eleventy@3.0.0-alpha.11':
- resolution: {integrity: sha512-NNhx2rySlFWfij2YQ87eU+03yLOhBNPRqGDTK/gjvsi/bY/OSAbb3sQLrycQpM6V5XtMlIqh6C1adxT0CMz3Rg==}
+ '@11ty/eleventy@3.0.0-alpha.12':
+ resolution: {integrity: sha512-dtBcjyAeUDKzYgrJ6/wTqZIUXCgEWGjlBhRT/5jX8GJ4yTkDxtmTzCbkaWOwvmqpYB5+OuZdnee9wAmm1pRDsQ==}
engines: {node: '>=18'}
hasBin: true
@@ -3058,7 +3058,7 @@ snapshots:
dependencies:
normalize-path: 3.0.0
- '@11ty/eleventy@3.0.0-alpha.11':
+ '@11ty/eleventy@3.0.0-alpha.12':
dependencies:
'@11ty/dependency-tree': 3.0.0
'@11ty/dependency-tree-esm': 1.0.0
@@ -3443,13 +3443,13 @@ snapshots:
agent-base@6.0.2:
dependencies:
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
agent-base@7.1.1:
dependencies:
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
@@ -4443,7 +4443,7 @@ snapshots:
dependencies:
basic-ftp: 5.0.5
data-uri-to-buffer: 6.0.2
- debug: 4.3.4
+ debug: 4.3.5
fs-extra: 11.2.0
transitivePeerDependencies:
- supports-color
@@ -4672,28 +4672,28 @@ snapshots:
dependencies:
'@tootallnate/once': 2.0.0
agent-base: 6.0.2
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.1
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
https-proxy-agent@5.0.1:
dependencies:
agent-base: 6.0.2
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.4:
dependencies:
agent-base: 7.1.1
- debug: 4.3.4
+ debug: 4.3.5
transitivePeerDependencies:
- supports-color
@@ -5384,7 +5384,7 @@ snapshots:
dependencies:
'@tootallnate/quickjs-emscripten': 0.23.0
agent-base: 7.1.1
- debug: 4.3.4
+ debug: 4.3.5
get-uri: 6.0.3
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.4
@@ -5562,7 +5562,7 @@ snapshots:
proxy-agent@6.4.0:
dependencies:
agent-base: 7.1.1
- debug: 4.3.4
+ debug: 4.3.5
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.4
lru-cache: 7.18.3
@@ -5879,7 +5879,7 @@ snapshots:
socks-proxy-agent@8.0.3:
dependencies:
agent-base: 7.1.1
- debug: 4.3.4
+ debug: 4.3.5
socks: 2.8.3
transitivePeerDependencies:
- supports-color
@@ -6132,7 +6132,7 @@ snapshots:
universal-analytics@0.5.3:
dependencies:
- debug: 4.3.4
+ debug: 4.3.5
uuid: 8.3.2
transitivePeerDependencies:
- supports-color
From 72e4ceea43c86cf048e890c89c1365d5490ab1da Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 12 Jun 2024 11:23:52 -0500
Subject: [PATCH 17/95] Bump shiki from 1.6.3 to 1.6.4 (#5908)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps [shiki](https://github.com/shikijs/shiki/tree/HEAD/packages/shiki)
from 1.6.3 to 1.6.4.
Release notes
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shiki&package-manager=npm_and_yarn&previous-version=1.6.3&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
pnpm-lock.yaml | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index 952b57800..c8f29048a 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,6 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.77.4",
- "shiki": "^1.6.3"
+ "shiki": "^1.6.4"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 86c5ec0df..a760ccd97 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,8 +58,8 @@ importers:
specifier: ^1.77.4
version: 1.77.4
shiki:
- specifier: ^1.6.3
- version: 1.6.3
+ specifier: ^1.6.4
+ version: 1.6.4
packages:
@@ -379,8 +379,8 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@shikijs/core@1.6.3':
- resolution: {integrity: sha512-QnJKHFUW95GnlJLJGP6QLx4M69HM0KlXk+R2Y8lr/x4nAx1Yb/lsuxq4XwybuUjTxbJk+BT0g/kvn0bcsjGGHg==}
+ '@shikijs/core@1.6.4':
+ resolution: {integrity: sha512-WTU9rzZae1p2v6LOxMf6LhtmZOkIHYYW160IuahUyJy7YXPPjyWZLR1ag+SgD22ZMxZtz1gfU6Tccc8t0Il/XA==}
'@sindresorhus/slugify@2.2.1':
resolution: {integrity: sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==}
@@ -2562,8 +2562,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@1.6.3:
- resolution: {integrity: sha512-lE1/YGlzFY0hQSyEfsZj18xGrTWxyhFQkaiILALqTBZPbJeYFWpbUhlmTGPOupYB/qC+H6sV4UznJzcEh3WMHQ==}
+ shiki@1.6.4:
+ resolution: {integrity: sha512-X88chM7w8jnadoZtjPTi5ahCJx9pc9f8GfEkZAEYUTlcUZIEw2D/RY86HI/LkkE7Nj8TQWkiBfaFTJ3VJT6ESg==}
side-channel@1.0.6:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
@@ -3372,7 +3372,7 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
- '@shikijs/core@1.6.3': {}
+ '@shikijs/core@1.6.4': {}
'@sindresorhus/slugify@2.2.1':
dependencies:
@@ -5851,9 +5851,9 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@1.6.3:
+ shiki@1.6.4:
dependencies:
- '@shikijs/core': 1.6.3
+ '@shikijs/core': 1.6.4
side-channel@1.0.6:
dependencies:
From 7b77106eafa11ce9fe248d77bf9398a21171e8e5 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 12 Jun 2024 12:35:51 -0500
Subject: [PATCH 18/95] Bump sass from 1.77.4 to 1.77.5 (#5909)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.4 to 1.77.5.
Release notes
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=sass&package-manager=npm_and_yarn&previous-version=1.77.4&new-version=1.77.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
pnpm-lock.yaml | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package.json b/package.json
index c8f29048a..dfc315020 100644
--- a/package.json
+++ b/package.json
@@ -36,7 +36,7 @@
"markdown-it-container": "^4.0.0",
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
- "sass": "^1.77.4",
+ "sass": "^1.77.5",
"shiki": "^1.6.4"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index a760ccd97..76542ea59 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -55,8 +55,8 @@ importers:
specifier: ^4.1.1
version: 4.1.1
sass:
- specifier: ^1.77.4
- version: 1.77.4
+ specifier: ^1.77.5
+ version: 1.77.5
shiki:
specifier: ^1.6.4
version: 1.6.4
@@ -2498,8 +2498,8 @@ packages:
safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
- sass@1.77.4:
- resolution: {integrity: sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==}
+ sass@1.77.5:
+ resolution: {integrity: sha512-oDfX1mukIlxacPdQqNb6mV2tVCrnE+P3nVYioy72V5tlk56CPNcO4TCuFcaCRKKfJ1M3lH95CleRS+dVKL2qMg==}
engines: {node: '>=14.0.0'}
hasBin: true
@@ -5752,7 +5752,7 @@ snapshots:
safer-buffer@2.1.2: {}
- sass@1.77.4:
+ sass@1.77.5:
dependencies:
chokidar: 3.6.0
immutable: 4.3.6
From 3373c8a26cf5671ca3781ce28d80d7584d7a953a Mon Sep 17 00:00:00 2001
From: Anthony Sansone
Date: Wed, 12 Jun 2024 13:06:14 -0500
Subject: [PATCH 19/95] Fix brand link (#5906)
Fixes #5904
---------
Co-authored-by: Marya <111139605+MaryaBelanger@users.noreply.github.com>
---
src/content/brand.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/content/brand.md b/src/content/brand.md
index 42e9b58ec..ad79f7175 100644
--- a/src/content/brand.md
+++ b/src/content/brand.md
@@ -16,8 +16,9 @@ material, as determined by Google.
Use of the Dart trademarks that is not expressly permitted by these
guidelines is prohibited absent written permission from Google.
-The official Dart logos can be found in the [Dart and Flutter logo
-assets](https://drive.google.com/corp/drive/folders/1KXNtO9My2AMpDOF9A9Y_4aj4_BcgmDDT) Drive folder.
+The official Dart logos can be found in the
+[Dart and Flutter logo assets](https://services.google.com/fh/files/misc/dart_brand_guidelines_assets.zip)
+archive.
## General rules that govern the use of the Dart trademarks
From 18191a8a91b0e3da0ecc1d5c85c13bb85fcd3a39 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 13 Jun 2024 11:00:50 -0500
Subject: [PATCH 20/95] Bump @11ty/eleventy from 3.0.0-alpha.12 to
3.0.0-alpha.13 (#5911)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps [@11ty/eleventy](https://github.com/11ty/eleventy) from
3.0.0-alpha.12 to 3.0.0-alpha.13.
Release notes
Fixes to facilitate RSS plugin updates:
80d9f980a5a2b655ee28cf1d45fb6e6d3370e707 and #3320
Breaking: Changes custom template syntax permalink compilation
default to raw#2780
Breaking: Removes advanced filters option in HTML
<base> plugin to rename Universal Filters for this
plugin (htmlBaseUrl, addPathPrefixToFullUrl,
and transformWithHtmlBase). Renaming filters in this plugin
will cause cross-plugin compatibility issues in other places in your
project.
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@11ty/eleventy&package-manager=npm_and_yarn&previous-version=3.0.0-alpha.12&new-version=3.0.0-alpha.13)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
pnpm-lock.yaml | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package.json b/package.json
index dfc315020..f411dd4bf 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,7 @@
"bootstrap-scss": "^4.6.2"
},
"devDependencies": {
- "@11ty/eleventy": "3.0.0-alpha.12",
+ "@11ty/eleventy": "3.0.0-alpha.13",
"@11ty/eleventy-img": "5.0.0-beta.4",
"firebase-tools": "^13.11.2",
"hast-util-from-html": "^2.0.1",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 76542ea59..c2ce6b1ee 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13,8 +13,8 @@ importers:
version: 4.6.2
devDependencies:
'@11ty/eleventy':
- specifier: 3.0.0-alpha.12
- version: 3.0.0-alpha.12
+ specifier: 3.0.0-alpha.13
+ version: 3.0.0-alpha.13
'@11ty/eleventy-img':
specifier: 5.0.0-beta.4
version: 5.0.0-beta.4(encoding@0.1.13)
@@ -94,8 +94,8 @@ packages:
resolution: {integrity: sha512-nULO91om7vQw4Y/UBjM8i7nJ1xl+/nyK4rImZ41lFxiY2d+XUz7ChAj1CDYFjrLZeu0utAYJTZ45LlcHTkUG4g==}
engines: {node: '>=12'}
- '@11ty/eleventy@3.0.0-alpha.12':
- resolution: {integrity: sha512-dtBcjyAeUDKzYgrJ6/wTqZIUXCgEWGjlBhRT/5jX8GJ4yTkDxtmTzCbkaWOwvmqpYB5+OuZdnee9wAmm1pRDsQ==}
+ '@11ty/eleventy@3.0.0-alpha.13':
+ resolution: {integrity: sha512-LZ1mI2JoB/vu6eIzeh9Eim0istAmKiJ0C5LEYG8HigvGgVsADd7OGHpOeOpDgKjotPSO+DTVh48gQj/cW2mRNw==}
engines: {node: '>=18'}
hasBin: true
@@ -3058,7 +3058,7 @@ snapshots:
dependencies:
normalize-path: 3.0.0
- '@11ty/eleventy@3.0.0-alpha.12':
+ '@11ty/eleventy@3.0.0-alpha.13':
dependencies:
'@11ty/dependency-tree': 3.0.0
'@11ty/dependency-tree-esm': 1.0.0
From dac460a97a3341d40fdab7f43e1bd2f9564d2a26 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 13 Jun 2024 11:41:02 -0500
Subject: [PATCH 21/95] Bump actions/checkout from 4.1.6 to 4.1.7 (#5912)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6
to 4.1.7.
Release notes
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.6&new-version=4.1.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anthony Sansone
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/scorecards-analysis.yml | 2 +-
.github/workflows/test.yml | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 068f06167..23db69b39 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 06bfbfcfa..a603950b4 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -21,7 +21,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
persist-credentials: false
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index cededc0ae..1cf39e9d0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -37,7 +37,7 @@ jobs:
experimental: false
continue-on-error: ${{ matrix.experimental }}
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -56,7 +56,7 @@ jobs:
name: Check if code excerpts are up to date
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -71,7 +71,7 @@ jobs:
name: Build site and check links
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -97,7 +97,7 @@ jobs:
name: Check if text can be replaced with site variables
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
@@ -112,7 +112,7 @@ jobs:
name: Validate Firebase configuration
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
submodules: recursive
- uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30
From 1bc64417fbc199bf27079123d61bd78eb4dcb130 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 13 Jun 2024 11:41:25 -0500
Subject: [PATCH 22/95] Bump github/codeql-action from 3.25.8 to 3.25.9 (#5913)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3.25.8 to 3.25.9.
Changelog
See the releases
page for the relevant changes to the CodeQL CLI and language
packs.
Note that the only difference between v2 and
v3 of the CodeQL Action is the node version they support,
with v3 running on node 20 while we continue to release
v2 to support running on node 16. For example
3.22.11 was the first v3 release and is
functionally identical to 2.22.11. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.
[UNRELEASED]
Update default CodeQL bundle version to 2.17.5. #2327
3.25.9 - 12 Jun 2024
Avoid failing database creation if the database folder already
exists and contains some unexpected files. Requires CodeQL 2.18.0 or
higher. #2330
The init Action will attempt to clean up the database cluster
directory before creating a new database and at the end of the job. This
will help to avoid issues where the database cluster directory is left
in an inconsistent state. #2332
3.25.8 - 04 Jun 2024
Update default CodeQL bundle version to 2.17.4. #2321
3.25.7 - 31 May 2024
We are rolling out a feature in May/June 2024 that will reduce the
Actions cache usage of the Action by keeping only the newest TRAP cache
for each language. #2306
3.25.6 - 20 May 2024
Update default CodeQL bundle version to 2.17.3. #2295
Avoid printing out a warning for a missing on.push
trigger when the CodeQL Action is triggered via a
workflow_call event. #2274
The tools: latest input to the init Action
has been renamed to tools: linked. This option specifies
that the Action should use the tools shipped at the same time as the
Action. The old name will continue to work for backwards compatibility,
but we recommend that new workflows use the new name. #2281
3.25.4 - 08 May 2024
Update default CodeQL bundle version to 2.17.2. #2270
3.25.3 - 25 Apr 2024
Update default CodeQL bundle version to 2.17.1. #2247
Workflows running on macos-latest using CodeQL CLI
versions before v2.15.1 will need to either upgrade their CLI version to
v2.15.1 or newer, or change the platform to an Intel MacOS runner, such
as macos-12. ARM machines with SIP disabled, including the
newest macos-latest image, are unsupported for CLI versions
before 2.15.1. #2261
3.25.2 - 22 Apr 2024
No user facing changes.
3.25.1 - 17 Apr 2024
We are rolling out a feature in April/May 2024 that improves the
reliability and performance of analyzing code when analyzing a compiled
language with the autobuildbuild
mode. #2235
Fix a bug where the init Action would fail if
--overwrite was specified in
CODEQL_ACTION_EXTRA_OPTIONS. #2245
... (truncated)
Commits
530d4fe
Merge pull request #2334
from github/update-v3.25.9-37809d1f1
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3.25.8&new-version=3.25.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anthony Sansone
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 23db69b39..9ee60e5a8 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
+ uses: github/codeql-action/init@530d4feaa9c62aaab2d250371e2061eb7a172363
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
+ uses: github/codeql-action/autobuild@530d4feaa9c62aaab2d250371e2061eb7a172363
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
+ uses: github/codeql-action/analyze@530d4feaa9c62aaab2d250371e2061eb7a172363
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index a603950b4..b7600cc29 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -49,6 +49,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff
+ uses: github/codeql-action/upload-sarif@530d4feaa9c62aaab2d250371e2061eb7a172363
with:
sarif_file: results.sarif
From ee8ca5702aced9048d024c6ae72fe9c07bbc84be Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 14 Jun 2024 13:46:10 -0500
Subject: [PATCH 23/95] Bump github/codeql-action from 3.25.9 to 3.25.10
(#5915)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 3.25.9 to 3.25.10.
Changelog
See the releases
page for the relevant changes to the CodeQL CLI and language
packs.
Note that the only difference between v2 and
v3 of the CodeQL Action is the node version they support,
with v3 running on node 20 while we continue to release
v2 to support running on node 16. For example
3.22.11 was the first v3 release and is
functionally identical to 2.22.11. This approach ensures an
easy way to track exactly which features are included in different
versions, indicated by the minor and patch version numbers.
[UNRELEASED]
No user facing changes.
3.25.10 - 13 Jun 2024
Update default CodeQL bundle version to 2.17.5. #2327
3.25.9 - 12 Jun 2024
Avoid failing database creation if the database folder already
exists and contains some unexpected files. Requires CodeQL 2.18.0 or
higher. #2330
The init Action will attempt to clean up the database cluster
directory before creating a new database and at the end of the job. This
will help to avoid issues where the database cluster directory is left
in an inconsistent state. #2332
3.25.8 - 04 Jun 2024
Update default CodeQL bundle version to 2.17.4. #2321
3.25.7 - 31 May 2024
We are rolling out a feature in May/June 2024 that will reduce the
Actions cache usage of the Action by keeping only the newest TRAP cache
for each language. #2306
3.25.6 - 20 May 2024
Update default CodeQL bundle version to 2.17.3. #2295
Avoid printing out a warning for a missing on.push
trigger when the CodeQL Action is triggered via a
workflow_call event. #2274
The tools: latest input to the init Action
has been renamed to tools: linked. This option specifies
that the Action should use the tools shipped at the same time as the
Action. The old name will continue to work for backwards compatibility,
but we recommend that new workflows use the new name. #2281
3.25.4 - 08 May 2024
Update default CodeQL bundle version to 2.17.2. #2270
3.25.3 - 25 Apr 2024
Update default CodeQL bundle version to 2.17.1. #2247
Workflows running on macos-latest using CodeQL CLI
versions before v2.15.1 will need to either upgrade their CLI version to
v2.15.1 or newer, or change the platform to an Intel MacOS runner, such
as macos-12. ARM machines with SIP disabled, including the
newest macos-latest image, are unsupported for CLI versions
before 2.15.1. #2261
3.25.2 - 22 Apr 2024
No user facing changes.
... (truncated)
Commits
23acc5c
Merge pull request #2337
from github/update-v3.25.10-5bf6dad35
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=3.25.9&new-version=3.25.10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 9ee60e5a8..70113bd41 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -33,7 +33,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@530d4feaa9c62aaab2d250371e2061eb7a172363
+ uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@530d4feaa9c62aaab2d250371e2061eb7a172363
+ uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@530d4feaa9c62aaab2d250371e2061eb7a172363
+ uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index b7600cc29..548321326 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -49,6 +49,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@530d4feaa9c62aaab2d250371e2061eb7a172363
+ uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251
with:
sarif_file: results.sarif
From e1aa3b1f13c5fa1169031ea9c7b14f1180621bb6 Mon Sep 17 00:00:00 2001
From: Michael Thomsen
Date: Mon, 17 Jun 2024 10:24:49 +0200
Subject: [PATCH 24/95] Update cookie notice bar text (#5916)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Update cookiebar per go/cookiebar, 2B
---
- [x] I’ve reviewed the contributor guide and applied the relevant
portions to this PR.
- [x] This PR doesn't contain automatically generated corrections or
text (Grammarly, LLMs, and similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn't use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
Contribution guidelines:
- See our [contributor
guide](https://github.com/dart-lang/site-www/blob/main/CONTRIBUTING.md)
for general expectations for PRs.
- Larger or significant changes should be discussed in an issue before
creating a PR.
- Code changes should generally follow the [Dart style
guide](https://dart.dev/effective-dart) and use `dart format`.
- Updates to [code
excerpts](https://github.com/dart-lang/site-shared/blob/main/doc/code-excerpts.md)
indicated by `
---------
Co-authored-by: Parker Lougheed
---
src/_includes/cookie-notice.html | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/_includes/cookie-notice.html b/src/_includes/cookie-notice.html
index 2570d9073..edbb6b27e 100644
--- a/src/_includes/cookie-notice.html
+++ b/src/_includes/cookie-notice.html
@@ -1,10 +1,9 @@
-
Google uses cookies to deliver its services, to personalize ads, and to
- analyze traffic. You can adjust your privacy controls anytime in your
- Google settings.
+
dart.dev uses cookies from Google to deliver and
+ enhance the quality of its services and to analyze traffic.
Learn more.
-
+
From 2ca9178ba4acada3758f59b64428c7b7fc3c982d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 17 Jun 2024 11:08:22 -0500
Subject: [PATCH 25/95] Bump shiki from 1.6.4 to 1.6.5 (#5917)
---
package.json | 2 +-
pnpm-lock.yaml | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/package.json b/package.json
index f411dd4bf..4c4508da5 100644
--- a/package.json
+++ b/package.json
@@ -37,6 +37,6 @@
"markdown-it-deflist": "^3.0.0",
"markdown-it-table": "^4.1.1",
"sass": "^1.77.5",
- "shiki": "^1.6.4"
+ "shiki": "^1.6.5"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c2ce6b1ee..0f2068d74 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -58,8 +58,8 @@ importers:
specifier: ^1.77.5
version: 1.77.5
shiki:
- specifier: ^1.6.4
- version: 1.6.4
+ specifier: ^1.6.5
+ version: 1.6.5
packages:
@@ -379,8 +379,8 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
- '@shikijs/core@1.6.4':
- resolution: {integrity: sha512-WTU9rzZae1p2v6LOxMf6LhtmZOkIHYYW160IuahUyJy7YXPPjyWZLR1ag+SgD22ZMxZtz1gfU6Tccc8t0Il/XA==}
+ '@shikijs/core@1.6.5':
+ resolution: {integrity: sha512-XcQYt6e4L61ruAxHiL3Xg1DL/XkWWjzDdeckB/DtN8jAxoAU+bcxsV6DetC8NafHpL4YpGhxy9iXF0ND/u6HmA==}
'@sindresorhus/slugify@2.2.1':
resolution: {integrity: sha512-MkngSCRZ8JdSOCHRaYd+D01XhvU3Hjy6MGl06zhOk614hp9EOAp5gIkBeQg7wtmxpitU6eAL4kdiRMcJa2dlrw==}
@@ -2562,8 +2562,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@1.6.4:
- resolution: {integrity: sha512-X88chM7w8jnadoZtjPTi5ahCJx9pc9f8GfEkZAEYUTlcUZIEw2D/RY86HI/LkkE7Nj8TQWkiBfaFTJ3VJT6ESg==}
+ shiki@1.6.5:
+ resolution: {integrity: sha512-iFzypldJG0zeyRHKAhaSGCf+YWXpMMyUyOrCVFBFKGGdF5vrB6jbd66/SQljxV20aSrVZEAQwUto/hhuNi/CIg==}
side-channel@1.0.6:
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
@@ -3372,7 +3372,7 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
- '@shikijs/core@1.6.4': {}
+ '@shikijs/core@1.6.5': {}
'@sindresorhus/slugify@2.2.1':
dependencies:
@@ -5851,9 +5851,9 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@1.6.4:
+ shiki@1.6.5:
dependencies:
- '@shikijs/core': 1.6.4
+ '@shikijs/core': 1.6.5
side-channel@1.0.6:
dependencies:
From 9fdfd04a9182606ee925999826e242d49e19d591 Mon Sep 17 00:00:00 2001
From: Parker Lougheed
Date: Mon, 17 Jun 2024 13:11:00 -0500
Subject: [PATCH 26/95] Begin incorporating linter rule diagnostic messages
(#5914)
---
src/content/tools/diagnostic-messages.md | 4608 +++++++++++++++++++++-
1 file changed, 4580 insertions(+), 28 deletions(-)
diff --git a/src/content/tools/diagnostic-messages.md b/src/content/tools/diagnostic-messages.md
index 9d2a671ab..3bf964be8 100644
--- a/src/content/tools/diagnostic-messages.md
+++ b/src/content/tools/diagnostic-messages.md
@@ -30,7 +30,7 @@ that might work in unexpected ways.
[bottom type]: https://dart.dev/null-safety/understanding-null-safety#top-and-bottom
[debugPrint]: https://api.flutter.dev/flutter/foundation/debugPrint.html
-[ffi]: https://dart.dev/guides/libraries/c-interop
+[ffi]: https://dart.dev/interop/c-interop
[IEEE 754]: https://en.wikipedia.org/wiki/IEEE_754
[irrefutable pattern]: https://dart.dev/resources/glossary#irrefutable-pattern
[kDebugMode]: https://api.flutter.dev/flutter/foundation/kDebugMode-constant.html
@@ -3721,7 +3721,7 @@ void f() {
try {
} catch (e) {
} [!on String {!]
- [!]}!]
+ [!}!]
}
```
@@ -3772,7 +3772,7 @@ void f() {
try {
} on num {
} [!on int {!]
- [!]}!]
+ [!}!]
}
```
@@ -23761,6 +23761,100 @@ const int x = 0;
const int y = x;
```
+### workspace_field_not_list
+
+_The value of the 'workspace' field is required to be a list of relative file
+paths._
+
+#### Description
+
+The analyzer produces this diagnostic when the value of the `workspace` key
+isn't a list.
+
+#### Example
+
+The following code produces this diagnostic because the value of the
+`workspace` key is a string when a list is expected:
+
+```yaml
+name: example
+workspace: [!notPaths!]
+```
+
+#### Common fixes
+
+Change the value of the workspace field so that it's a list:
+
+```yaml
+name: example
+workspace:
+ - pkg/package_1
+ - pkg/package_2
+```
+
+### workspace_value_not_string
+
+_Workspace entries are required to be directory paths (strings)._
+
+#### Description
+
+The analyzer produces this diagnostic when a `workspace` list contains a
+value that isn't a string.
+
+#### Example
+
+The following code produces this diagnostic because the `workspace` list
+contains a map:
+
+```yaml
+name: example
+workspace:
+ - [!image.gif: true!]
+```
+
+#### Common fixes
+
+Change the `workspace` list so that it only contains valid POSIX-style directory
+paths:
+
+```yaml
+name: example
+workspace:
+ - pkg/package_1
+ - pkg/package_2
+```
+
+### workspace_value_not_subdirectory
+
+_Workspace values must be a relative path of a subdirectory of '{0}'._
+
+#### Description
+
+The analyzer produces this diagnostic when a `workspace` list contains a
+value that is not a subdirectory of the directory containing the `pubspec.yaml`` file.
+
+#### Example
+
+The following code produces this diagnostic because the value in the `workspace` list is not a
+relative path of a subdirectory of the directory containing the 'pubspec.yaml' file:
+
+```yaml
+name: example
+workspace:
+ - /home/my_package
+```
+
+#### Common fixes
+
+Change the `workspace` list so that it only contains only subdirectory paths.
+
+```yaml
+name: example
+workspace:
+ - pkg/package_1
+ - pkg/package_2
+```
+
### wrong_number_of_parameters_for_operator
_Operator '-' should declare 0 or 1 parameter, but {0} found._
@@ -24154,55 +24248,4513 @@ Iterable get zero sync* {
}
```
-### invalid_use_of_do_not_submit_member
+### always_declare_return_types
-_Uses of '{0}' should not be submitted to source control._
+_Missing return type on method._
#### Description
-The analyzer produces this diagnostic when a member that is annotated with
-[`@doNotSubmit`][meta-doNotSubmit] is referenced outside of a member
-declaration that is also annotated with `@doNotSubmit`.
+The analyzer produces this diagnostic when a method or function doesn't
+have an explicit return type.
#### Example
-Given a file `a.dart` containing the following declaration:
+The following code produces this diagnostic because the function `f`
+doesn't have a return type:
```dart
-import 'package:meta/meta.dart';
+[!f!]() {}
+```
-@doNotSubmit
-void emulateCrash() { /* ... */ }
+#### Common fixes
+
+Add an explicit return type:
+
+```dart
+void f() {}
```
-The following code produces this diagnostic because the declaration is
-being referenced outside of a member that is also annotated with
-`@doNotSubmit`:
+### always_put_control_body_on_new_line
+
+_Statement should be on a separate line._
+
+#### Description
+
+The analyzer produces this diagnostic when the code being controlled by a
+control flow statement (`if`, `for`, `while`, or `do`) is on the same line
+as the control flow statement.
+
+#### Example
+
+The following code produces this diagnostic because the `return` statement
+is on the same line as the `if` that controls whether the `return` will be
+executed:
```dart
-import 'a.dart';
+void f(bool b) {
+ if (b) [!return!];
+}
+```
-void f() {
- [!emulateCrash!]();
+#### Common fixes
+
+Put the controlled statement onto a separate, indented, line:
+
+```dart
+void f(bool b) {
+ if (b)
+ return;
}
```
+### always_put_required_named_parameters_first
+
+_Required named parameters should be before optional named parameters._
+
+#### Description
+
+The analyzer produces this diagnostic when required named parameters occur
+after optional named parameters.
+
+#### Example
+
+The following code produces this diagnostic because the required parameter
+`x` is after the optional parameter `y`:
+
+```dart
+void f({int? y, required int [!x!]}) {}
+```
+
#### Common fixes
-Most commonly, when complete with local testing, the reference to the
-member should be removed.
+Reorder the parameters so that all required named parameters are before
+any optional named parameters:
-If building additional functionality on top of the member, annotate the
-newly added member with `@doNotSubmit` as well:
+```dart
+void f({required int x, int? y}) {}
+```
+
+### always_use_package_imports
+
+_Use 'package:' imports for files in the 'lib' directory._
+
+#### Description
+
+The analyzer produces this diagnostic when an `import` in a library inside
+the `lib` directory uses a relative path to import another library inside
+the `lib` directory of the same package.
+
+#### Example
+
+Given that a file named `a.dart` and the code below are both inside the
+`lib` directory of the same package, the following code produces this
+diagnostic because a relative URI is used to import `a.dart`:
```dart
-import 'package:meta/meta.dart';
+import [!'a.dart'!];
+```
-import 'a.dart';
+#### Common fixes
-@doNotSubmit
-void emulateCrashWithOtherFunctionality() {
- emulateCrash();
- // do other things.
+Use a package import:
+
+```dart
+import 'package:p/a.dart';
+```
+
+### annotate_overrides
+
+_The member '{0}' overrides an inherited member but isn't annotated with
+'@override'._
+
+#### Description
+
+The analyzer produces this diagnostic when a member overrides an inherited
+member, but isn't annotated with `@override`.
+
+#### Example
+
+The following code produces this diagnostic because the method `m` in the
+class `B` overrides the method with the same name in class `A`, but isn't
+marked as an intentional override:
+
+```dart
+class A {
+ void m() {}
+}
+
+class B extends A {
+ void [!m!]() {}
+}
+```
+
+#### Common fixes
+
+If the member in the subclass is intended to override the member in the
+superclass, then add an `@override` annotation:
+
+```dart
+class A {
+ void m() {}
+}
+
+class B extends A {
+ @override
+ void m() {}
+}
+```
+
+If the member in the subclass is not intended to override the member in
+the superclass, then rename one of the members:
+
+```dart
+class A {
+ void m() {}
+}
+
+class B extends A {
+ void m2() {}
+}
+```
+
+### avoid_empty_else
+
+_Empty statements are not allowed in an 'else' clause._
+
+#### Description
+
+The analyzer produces this diagnostic when the statement after an `else`
+is an empty statement (a semicolon).
+
+For more information, see the documentation for
+[`avoid_empty_else`](https://dart.dev/diagnostics/avoid_empty_else).
+
+#### Example
+
+The following code produces this diagnostic because the statement
+following the `else` is an empty statement:
+
+```dart
+void f(int x, int y) {
+ if (x > y)
+ print("1");
+ else [!;!]
+ print("2");
+}
+```
+
+#### Common fixes
+
+If the statement after the empty statement is intended to be executed only
+when the condition is `false`, then remove the empty statement:
+
+```dart
+void f(int x, int y) {
+ if (x > y)
+ print("1");
+ else
+ print("2");
+}
+```
+
+If there is no code that is intended to be executed only when the
+condition is `false`, then remove the whole `else` clause:
+
+```dart
+void f(int x, int y) {
+ if (x > y)
+ print("1");
+ print("2");
+}
+```
+
+### avoid_function_literals_in_foreach_calls
+
+_Function literals shouldn't be passed to 'forEach'._
+
+#### Description
+
+The analyzer produces this diagnostic when the argument to
+`Iterable.forEach` is a closure.
+
+#### Example
+
+The following code produces this diagnostic because the argument to the
+invocation of `forEach` is a closure:
+
+```dart
+void f(Iterable s) {
+ s.[!forEach!]((e) => print(e));
+}
+```
+
+#### Common fixes
+
+If the closure can be replaced by a tear-off, then replace the closure:
+
+```dart
+void f(Iterable s) {
+ s.forEach(print);
+}
+```
+
+If the closure can't be replaced by a tear-off, then use a `for` loop to
+iterate over the elements:
+
+```dart
+void f(Iterable s) {
+ for (var e in s) {
+ print(e);
+ }
+}
+```
+
+### avoid_init_to_null
+
+_Redundant initialization to 'null'._
+
+#### Description
+
+The analyzer produces this diagnostic when a nullable variable is
+explicitly initialized to `null`. The variable can be a local variable,
+field, or top-level variable.
+
+A variable or field that isn't explicitly initialized automatically gets
+initialized to `null`. There's no concept of "uninitialized memory" in
+Dart.
+
+#### Example
+
+The following code produces this diagnostic because the variable `f` is
+explicitly initialized to `null`:
+
+```dart
+class C {
+ int? [!f = null!];
+
+ void m() {
+ if (f != null) {
+ print(f);
+ }
+ }
}
```
+
+#### Common fixes
+
+Remove the unnecessary initialization:
+
+```dart
+class C {
+ int? f;
+
+ void m() {
+ if (f != null) {
+ print(f);
+ }
+ }
+}
+```
+
+### avoid_print
+
+_Don't invoke 'print' in production code._
+
+#### Description
+
+The analyzer produces this diagnostic when the function `print` is invoked
+in production code.
+
+#### Example
+
+The following code produces this diagnostic because the function `print`
+can't be invoked in production:
+
+```dart
+void f(int x) {
+ [!print!]('x = $x');
+}
+```
+
+#### Common fixes
+
+If you're writing code that uses Flutter, then use the function
+[`debugPrint`][debugPrint], guarded by a test
+using [`kDebugMode`][kDebugMode]:
+
+```dart
+import 'package:flutter/foundation.dart';
+
+void f(int x) {
+ if (kDebugMode) {
+ debugPrint('x = $x');
+ }
+}
+```
+
+If you're writing code that doesn't use Flutter, then use a logging
+service, such as [`package:logging`][package-logging], to write the
+information.
+
+### avoid_relative_lib_imports
+
+_Can't use a relative path to import a library in 'lib'._
+
+#### Description
+
+The analyzer produces this diagnostic when the URI in an `import`
+directive has `lib` in the path.
+
+#### Example
+
+Assuming that there is a file named `a.dart` in the `lib` directory:
+
+```dart
+class A {}
+```
+
+The following code produces this diagnostic because the import contains a
+path that includes `lib`:
+
+```dart
+import [!'../lib/a.dart'!];
+```
+
+#### Common fixes
+
+Rewrite the import to not include `lib` in the URI:
+
+```dart
+import 'a.dart';
+```
+
+### avoid_renaming_method_parameters
+
+_The parameter name '{0}' doesn't match the name '{1}' in the overridden
+method._
+
+#### Description
+
+The analyzer produces this diagnostic when a method that overrides a
+method from a superclass changes the names of the parameters.
+
+#### Example
+
+The following code produces this diagnostic because the parameter of the
+method `m` in `B` is named `b`, which is different from the name of the
+overridden method's parameter in `A`:
+
+```dart
+class A {
+ void m(int a) {}
+}
+
+class B extends A {
+ @override
+ void m(int [!b!]) {}
+}
+```
+
+#### Common fixes
+
+Rename one of the parameters so that they are the same:
+
+```dart
+class A {
+ void m(int a) {}
+}
+
+class B extends A {
+ @override
+ void m(int a) {}
+}
+```
+
+### avoid_return_types_on_setters
+
+_Unnecessary return type on a setter._
+
+#### Description
+
+The analyzer produces this diagnostic when a setter has an explicit return
+type.
+
+Setters never return a value, so declaring the return type of one is
+redundant.
+
+#### Example
+
+The following code produces this diagnostic because the setter `s` has an
+explicit return type (`void`):
+
+```dart
+[!void!] set s(int p) {}
+```
+
+#### Common fixes
+
+Remove the return type:
+
+```dart
+set s(int p) {}
+```
+
+### avoid_returning_null_for_void
+
+_Don't return 'null' from a function with a return type of 'void'._
+
+_Don't return 'null' from a method with a return type of 'void'._
+
+#### Description
+
+The analyzer produces this diagnostic when a function that has a return
+type of `void` explicitly returns `null`.
+
+#### Example
+
+The following code produces this diagnostic because there is an explicit
+return of `null` in a `void` function:
+
+```dart
+void f() {
+ [!return null;!]
+}
+```
+
+#### Common fixes
+
+Remove the unnecessary explicit `null`:
+
+```dart
+void f() {
+ return;
+}
+```
+
+### avoid_shadowing_type_parameters
+
+_The type parameter '{0}' shadows a type parameter from the enclosing {1}._
+
+#### Description
+
+The analyzer produces this diagnostic when a type parameter shadows a type
+parameter from an enclosing declaration.
+
+Shadowing a type parameter with a different type parameter can lead to
+subtle bugs that are difficult to debug.
+
+#### Example
+
+The following code produces this diagnostic because the type parameter `T`
+defined by the method `m` shadows the type parameter `T` defined by the
+class `C`:
+
+```dart
+class C {
+ void m<[!T!]>() {}
+}
+```
+
+#### Common fixes
+
+Rename one of the type parameters:
+
+```dart
+class C {
+ void m() {}
+}
+```
+
+### avoid_single_cascade_in_expression_statements
+
+_Unnecessary cascade expression._
+
+#### Description
+
+The analyzer produces this diagnostic when a single cascade operator is
+used and the value of the expression isn't being used for anything (such
+as being assigned to a variable or being passed as an argument).
+
+#### Example
+
+The following code produces this diagnostic because the value of the
+cascade expression `s..length` isn't being used:
+
+```dart
+void f(String s) {
+ [!s..length!];
+}
+```
+
+#### Common fixes
+
+Replace the cascade operator with a simple access operator:
+
+```dart
+void f(String s) {
+ s.length;
+}
+```
+
+### avoid_slow_async_io
+
+_Use of an async 'dart:io' method._
+
+#### Description
+
+The analyzer produces this diagnostic when an asynchronous file I/O method
+with a synchronous equivalent is used.
+
+The following are the specific flagged asynchronous methods:
+
+- `Directory.exists`
+- `Directory.stat`
+- `File.lastModified`
+- `File.exists`
+- `File.stat`
+- `FileSystemEntity.isDirectory`
+- `FileSystemEntity.isFile`
+- `FileSystemEntity.isLink`
+- `FileSystemEntity.type`
+
+#### Example
+
+The following code produces this diagnostic because the async method
+`exists` is invoked:
+
+```dart
+import 'dart:io';
+
+Future g(File f) async {
+ await [!f.exists()!];
+}
+```
+
+#### Common fixes
+
+Use the synchronous version of the method:
+
+```dart
+import 'dart:io';
+
+void g(File f) {
+ f.existsSync();
+}
+```
+
+### avoid_type_to_string
+
+_Using 'toString' on a 'Type' is not safe in production code._
+
+#### Description
+
+The analyzer produces this diagnostic when the method `toString` is
+invoked on a value whose static type is `Type`.
+
+#### Example
+
+The following code produces this diagnostic because the method `toString`
+is invoked on the `Type` returned by `runtimeType`:
+
+```dart
+bool isC(Object o) => o.runtimeType.[!toString!]() == 'C';
+
+class C {}
+```
+
+#### Common fixes
+
+If it's essential that the type is exactly the same, then use an explicit
+comparison:
+
+```dart
+bool isC(Object o) => o.runtimeType == C;
+
+class C {}
+```
+
+If it's alright for instances of subtypes of the type to return `true`,
+then use a type check:
+
+```dart
+bool isC(Object o) => o is C;
+
+class C {}
+```
+
+### avoid_types_as_parameter_names
+
+_The parameter name '{0}' matches a visible type name._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a parameter in a
+parameter list is the same as a visible type (a type whose name is in
+scope).
+
+This often indicates that the intended name of the parameter is missing,
+causing the name of the type to be used as the name of the parameter
+rather than the type of the parameter. Even when that's not the case (the
+name of the parameter is intentional), the name of the parameter will
+shadow the existing type, which can lead to bugs that are difficult to
+diagnose.
+
+#### Example
+
+The following code produces this diagnostic because the function `f` has a
+parameter named `int`, which shadows the type `int` from `dart:core`:
+
+```dart
+void f([!int!]) {}
+```
+
+#### Common fixes
+
+If the parameter name is missing, then add a name for the parameter:
+
+```dart
+void f(int x) {}
+```
+
+If the parameter is intended to have an implicit type of `dynamic`, then
+rename the parameter so that it doesn't shadow the name of any visible type:
+
+```dart
+void f(int_) {}
+```
+
+### avoid_unnecessary_containers
+
+_Unnecessary instance of 'Container'._
+
+#### Description
+
+The analyzer produces this diagnostic when a widget tree contains an
+instance of `Container` and the only argument to the constructor is
+`child:`.
+
+#### Example
+
+The following code produces this diagnostic because the invocation of the
+`Container` constructor only has a `child:` argument:
+
+```dart
+import 'package:flutter/material.dart';
+
+Widget buildRow() {
+ return [!Container!](
+ child: Row(
+ children: [
+ Text('a'),
+ Text('b'),
+ ],
+ )
+ );
+}
+```
+
+#### Common fixes
+
+If you intended to provide other arguments to the constructor, then add
+them:
+
+```dart
+import 'package:flutter/material.dart';
+
+Widget buildRow() {
+ return Container(
+ color: Colors.red.shade100,
+ child: Row(
+ children: [
+ Text('a'),
+ Text('b'),
+ ],
+ )
+ );
+}
+```
+
+If no other arguments are needed, then unwrap the child widget:
+
+```dart
+import 'package:flutter/material.dart';
+
+Widget buildRow() {
+ return Row(
+ children: [
+ Text('a'),
+ Text('b'),
+ ],
+ );
+}
+```
+
+### avoid_web_libraries_in_flutter
+
+_Don't use web-only libraries outside Flutter web plugin packages._
+
+#### Description
+
+The analyzer produces this diagnostic when a library in a package that
+isn't a web plugin contains an import of a web-only library:
+- `dart:html`
+- `dart:js`
+- `dart:js_util`
+- `dart:js_interop`
+- `dart:js_interop_unsafe`
+- `package:js`
+- `package:web`
+
+#### Example
+
+When found in a package that isn't a web plugin, the following code
+produces this diagnostic because it imports `dart:html`:
+
+```dart
+import [!'dart:html'!];
+
+import 'package:flutter/material.dart';
+
+class C {}
+```
+
+#### Common fixes
+
+If the package isn't intended to be a web plugin, then remove the import:
+
+```dart
+import 'package:flutter/material.dart';
+
+class C {}
+```
+
+If the package is intended to be a web plugin, then add the following
+lines to the `pubspec.yaml` file of the package:
+
+```yaml
+flutter:
+ plugin:
+ platforms:
+ web:
+ pluginClass: HelloPlugin
+ fileName: hello_web.dart
+```
+
+See [Developing packages & plugins](https://docs.flutter.dev/packages-and-plugins/developing-packages)
+for more information.
+
+### await_only_futures
+
+_Uses 'await' on an instance of '{0}', which is not a subtype of 'Future'._
+
+#### Description
+
+The analyzer produces this diagnostic when the expression after `await`
+has any type other than `Future`, `FutureOr`, `Future?`,
+`FutureOr?` or `dynamic`.
+
+An exception is made for the expression `await null` because it is a
+common way to introduce a microtask delay.
+
+Unless the expression can produce a `Future`, the `await` is unnecessary
+and can cause a reader to assume a level of asynchrony that doesn't exist.
+
+#### Example
+
+The following code produces this diagnostic because the expression after
+`await` has the type `int`:
+
+```dart
+void f() async {
+ [!await!] 23;
+}
+```
+
+#### Common fixes
+
+Remove the `await`:
+
+```dart
+void f() async {
+ 23;
+}
+```
+
+### camel_case_extensions
+
+_The extension name '{0}' isn't an UpperCamelCase identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of an extension
+doesn't use the 'UpperCamelCase' naming convention.
+
+#### Example
+
+The following code produces this diagnostic because the name of the
+extension doesn't start with an uppercase letter:
+
+```dart
+extension [!stringExtension!] on String {}
+```
+
+#### Common fixes
+
+If the extension needs to have a name (needs to be visible outside this
+library), then rename the extension so that it has a valid name:
+
+```dart
+extension StringExtension on String {}
+```
+
+If the extension doesn't need to have a name, then remove the name of the
+extension:
+
+```dart
+extension on String {}
+```
+
+### camel_case_types
+
+_The type name '{0}' isn't an UpperCamelCase identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a type (a class,
+mixin, enum, or typedef) doesn't use the 'UpperCamelCase' naming
+convention.
+
+#### Example
+
+The following code produces this diagnostic because the name of the class
+doesn't start with an uppercase letter:
+
+```dart
+class [!c!] {}
+```
+
+#### Common fixes
+
+Rename the type so that it has a valid name:
+
+```dart
+class C {}
+```
+
+### cancel_subscriptions
+
+_Uncancelled instance of 'StreamSubscription'._
+
+#### Description
+
+The analyzer produces this diagnostic when an instance of
+`StreamSubscription` is created but the method `cancel` isn't invoked.
+
+#### Example
+
+The following code produces this diagnostic because the `subscription`
+isn't canceled:
+
+```dart
+import 'dart:async';
+
+void f(Stream stream) {
+ // ignore: unused_local_variable
+ var [!subscription = stream.listen((_) {})!];
+}
+```
+
+#### Common fixes
+
+Cancel the subscription:
+
+```dart
+import 'dart:async';
+
+void f(Stream stream) {
+ var subscription = stream.listen((_) {});
+ subscription.cancel();
+}
+```
+
+### close_sinks
+
+_Unclosed instance of 'Sink'._
+
+#### Description
+
+The analyzer produces this diagnostic when an instance of `Sink` is
+created but the method `close` isn't invoked.
+
+#### Example
+
+The following code produces this diagnostic because the `sink` isn't
+closed:
+
+```dart
+import 'dart:io';
+
+void g(File f) {
+ var [!sink = f.openWrite()!];
+ sink.write('x');
+}
+```
+
+#### Common fixes
+
+Close the sink:
+
+```dart
+import 'dart:io';
+
+void g(File f) {
+ var sink = f.openWrite();
+ sink.write('x');
+ sink.close();
+}
+```
+
+### collection_methods_unrelated_type
+
+_The argument type '{0}' isn't related to '{1}'._
+
+#### Description
+
+The analyzer produces this diagnostic when any one of several methods in
+the core libraries are invoked with arguments of an inappropriate type.
+These methods are ones that don't provide a specific enough type for the
+parameter to allow the normal type checking to catch the error.
+
+The arguments that are checked are:
+- an argument to `Iterable.contains` should be related to `E`
+- an argument to `List.remove` should be related to `E`
+- an argument to `Map.containsKey` should be related to `K`
+- an argument to `Map.containsValue` should be related to `V`
+- an argument to `Map.remove` should be related to `K`
+- an argument to `Map.[]` should be related to `K`
+- an argument to `Queue.remove` should be related to `E`
+- an argument to `Set.lookup` should be related to `E`
+- an argument to `Set.remove` should be related to `E`
+
+#### Example
+
+The following code produces this diagnostic because the argument to
+`contains` is a `String`, which isn't assignable to `int`, the element
+type of the list `l`:
+
+```dart
+bool f(List l) => l.contains([!'1'!]);
+```
+
+#### Common fixes
+
+If the element type is correct, then change the argument to have the same
+type:
+
+```dart
+bool f(List l) => l.contains(1);
+```
+
+If the argument type is correct, then change the element type:
+
+```dart
+bool f(List l) => l.contains('1');
+```
+
+### constant_identifier_names
+
+_The constant name '{0}' isn't a lowerCamelCase identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a constant doesn't
+follow the lowerCamelCase naming convention.
+
+#### Example
+
+The following code produces this diagnostic because the name of the
+top-level variable isn't a lowerCamelCase identifier:
+
+```dart
+const [!EMPTY_STRING!] = '';
+```
+
+#### Common fixes
+
+Rewrite the name to follow the lowerCamelCase naming convention:
+
+```dart
+const emptyString = '';
+```
+
+### control_flow_in_finally
+
+_Use of '{0}' in a 'finally' clause._
+
+#### Description
+
+The analyzer produces this diagnostic when a `finally` clause contains a
+`return`, `break`, or `continue` statement.
+
+#### Example
+
+The following code produces this diagnostic because there is a `return`
+statement inside a `finally` block:
+
+```dart
+int f() {
+ try {
+ return 1;
+ } catch (e) {
+ print(e);
+ } finally {
+ [!return 0;!]
+ }
+}
+```
+
+#### Common fixes
+
+If the statement isn't needed, then remove the statement, and remove the
+`finally` clause if the block is empty:
+
+```dart
+int f() {
+ try {
+ return 1;
+ } catch (e) {
+ print(e);
+ }
+}
+```
+
+If the statement is needed, then move the statement outside the `finally`
+block:
+
+```dart
+int f() {
+ try {
+ return 1;
+ } catch (e) {
+ print(e);
+ }
+ return 0;
+}
+```
+
+### curly_braces_in_flow_control_structures
+
+_Statements in {0} should be enclosed in a block._
+
+#### Description
+
+The analyzer produces this diagnostic when a control structure (`if`,
+`for`, `while`, or `do` statement) has a statement other than a block.
+
+#### Example
+
+The following code produces this diagnostic because the `then` statement
+is not enclosed in a block:
+
+```dart
+int f(bool b) {
+ if (b)
+ [!return 1;!]
+ return 0;
+}
+```
+
+#### Common fixes
+
+Add braces around the statement that should be a block:
+
+```dart
+int f(bool b) {
+ if (b) {
+ return 1;
+ }
+ return 0;
+}
+```
+
+### dangling_library_doc_comments
+
+_Dangling library doc comment._
+
+#### Description
+
+The analyzer produces this diagnostic when a documentation comment that
+appears to be library documentation isn't followed by a `library`
+directive. More specifically, it is produced when a documentation comment
+appears before the first directive in the library, assuming that it isn't
+a `library` directive, or before the first top-level declaration and is
+separated from the declaration by one or more blank lines.
+
+#### Example
+
+The following code produces this diagnostic because there's a
+documentation comment before the first `import` directive:
+
+```dart
+[!/// This is a great library.!]
+import 'dart:core';
+```
+
+The following code produces this diagnostic because there's a
+documentation comment before the first class declaration, but there's a
+blank line between the comment and the declaration.
+
+```dart
+[!/// This is a great library.!]
+
+class C {}
+```
+
+#### Common fixes
+
+If the comment is library documentation, then add a `library` directive
+without a name:
+
+```dart
+/// This is a great library.
+library;
+
+import 'dart:core';
+```
+
+If the comment is documentation for the following declaration, then remove
+the blank line:
+
+```dart
+/// This is a great library.
+class C {}
+```
+
+### depend_on_referenced_packages
+
+_The imported package '{0}' isn't a dependency of the importing package._
+
+#### Description
+
+The analyzer produces this diagnostic when a package import refers to a
+package that is not specified in the `pubspec.yaml` file.
+
+Depending explicitly on packages that you reference ensures they will
+always exist and allows you to put a dependency constraint on them to
+guard against breaking changes.
+
+#### Example
+
+Given a `pubspec.yaml` file containing the following:
+
+```yaml
+dependencies:
+ meta: ^3.0.0
+```
+
+The following code produces this diagnostic because there is no dependency
+on the package `a`:
+
+```dart
+import 'package:a/a.dart';
+```
+
+#### Common fixes
+
+Whether the dependency should be a regular dependency or dev dependency
+depends on whether the package is referenced from a public library (one
+under either `lib` or `bin`), or only private libraries, (such as one
+under `test`).
+
+If the package is referenced from at least one public library, then add a
+regular dependency on the package to the `pubspec.yaml` file under the
+`dependencies` field:
+
+```yaml
+dependencies:
+ a: ^1.0.0
+ meta: ^3.0.0
+```
+
+If the package is referenced only from private libraries, then add a
+dev dependency on the package to the `pubspec.yaml` file under the
+`dev_dependencies` field:
+
+```yaml
+dependencies:
+ meta: ^3.0.0
+dev_dependencies:
+ a: ^1.0.0
+```
+
+### empty_catches
+
+_Empty catch block._
+
+#### Description
+
+The analyzer produces this diagnostic when the block in a `catch` clause
+is empty.
+
+#### Example
+
+The following code produces this diagnostic because the catch block is
+empty:
+
+```dart
+void f() {
+ try {
+ print('Hello');
+ } catch (exception) [!{}!]
+}
+```
+
+#### Common fixes
+
+If the exception shouldn't be ignored, then add code to handle the
+exception:
+
+```dart
+void f() {
+ try {
+ print('We can print.');
+ } catch (exception) {
+ print("We can't print.");
+ }
+}
+```
+
+If the exception is intended to be ignored, then add a comment explaining
+why:
+
+```dart
+void f() {
+ try {
+ print('We can print.');
+ } catch (exception) {
+ // Nothing to do.
+ }
+}
+```
+
+If the exception is intended to be ignored and there isn't any good
+explanation for why, then rename the exception parameter:
+
+```dart
+void f() {
+ try {
+ print('We can print.');
+ } catch (_) {}
+}
+```
+
+### empty_constructor_bodies
+
+_Empty constructor bodies should be written using a ';' rather than '{}'._
+
+#### Description
+
+The analyzer produces this diagnostic when a constructor has an empty
+block body.
+
+#### Example
+
+The following code produces this diagnostic because the constructor for
+`C` has a block body that is empty:
+
+```dart
+class C {
+ C() [!{}!]
+}
+```
+
+#### Common fixes
+
+Replace the block with a semicolon:
+
+```dart
+class C {
+ C();
+}
+```
+
+### empty_statements
+
+_Unnecessary empty statement._
+
+#### Description
+
+The analyzer produces this diagnostic when an empty statement is found.
+
+#### Example
+
+The following code produces this diagnostic because the statement
+controlled by the `while` loop is an empty statement:
+
+```dart
+void f(bool condition) {
+ while (condition)[!;!]
+ g();
+}
+
+void g() {}
+```
+
+#### Common fixes
+
+If there are no statements that need to be controlled, then remove both
+the empty statement and the control structure it's part of (being careful
+that any other code being removed doesn't have a side-effect that needs to
+be preserved):
+
+```dart
+void f(bool condition) {
+ g();
+}
+
+void g() {}
+```
+
+If there are no statements that need to be controlled but the control
+structure is still required for other reasons, then replace the empty
+statement with a block to make the structure of the code more obvious:
+
+```dart
+void f(bool condition) {
+ while (condition) {}
+ g();
+}
+
+void g() {}
+```
+
+If there are statements that need to be controlled, remove the empty
+statement and adjust the code so that the appropriate statements are being
+controlled, possibly adding a block:
+
+```dart
+void f(bool condition) {
+ while (condition) {
+ g();
+ }
+}
+
+void g() {}
+```
+
+### file_names
+
+_The file name '{0}' isn't a lower\_case\_with\_underscores identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a `.dart` file
+doesn't use lower_case_with_underscores.
+
+#### Example
+
+A file named `SliderMenu.dart` produces this diagnostic because the file
+name uses the UpperCamelCase convention.
+
+#### Common fixes
+
+Rename the file to use the lower_case_with_underscores convention, such as
+`slider_menu.dart`.
+
+### hash_and_equals
+
+_Missing a corresponding override of '{0}'._
+
+#### Description
+
+The analyzer produces this diagnostic when a class or mixin either
+overrides the definition of `==` but doesn't override the definition of
+`hashCode`, or conversely overrides the definition of `hashCode` but
+doesn't override the definition of `==`.
+
+Both the `==` operator and the `hashCode` property of objects must be
+consistent for a common hash map implementation to function properly. As a
+result, when overriding either method, both should be overridden.
+
+#### Example
+
+The following code produces this diagnostic because the class `C`
+overrides the `==` operator but doesn't override the getter `hashCode`:
+
+```dart
+class C {
+ final int value;
+
+ C(this.value);
+
+ @override
+ bool operator [!==!](Object other) =>
+ other is C &&
+ other.runtimeType == runtimeType &&
+ other.value == value;
+}
+```
+
+#### Common fixes
+
+If you need to override one of the members, then add an override of the
+other:
+
+```dart
+class C {
+ final int value;
+
+ C(this.value);
+
+ @override
+ bool operator ==(Object other) =>
+ other is C &&
+ other.runtimeType == runtimeType &&
+ other.value == value;
+
+ @override
+ int get hashCode => value.hashCode;
+}
+```
+
+If you don't need to override either of the members, then remove the
+unnecessary override:
+
+```dart
+class C {
+ final int value;
+
+ C(this.value);
+}
+```
+
+### implementation_imports
+
+_Import of a library in the 'lib/src' directory of another package._
+
+#### Description
+
+The analyzer produces this diagnostic when an import references a library
+that's inside the `lib/src` directory of a different package, which
+violates [the convention for pub
+packages](https://dart.dev/tools/pub/package-layout#implementation-files).
+
+#### Example
+
+The following code, assuming that it isn't part of the `ffi` package,
+produces this diagnostic because the library being imported is inside the
+top-level `src` directory:
+
+```dart
+import [!'package:ffi/src/allocation.dart'!];
+```
+
+#### Common fixes
+
+If the library being imported contains code that's part of the public API,
+then import the public library that exports the public API:
+
+```dart
+import 'package:ffi/ffi.dart';
+```
+
+If the library being imported isn't part of the public API of the package,
+then either find a different way to accomplish your goal, assuming that
+it's possible, or open an issue asking the package authors to make it part
+of the public API.
+
+### implicit_call_tearoffs
+
+_Implicit tear-off of the 'call' method._
+
+#### Description
+
+The analyzer produces this diagnostic when an object with a `call` method
+is assigned to a function-typed variable, implicitly tearing off the
+`call` method.
+
+#### Example
+
+The following code produces this diagnostic because an instance of
+`Callable` is passed to a function expecting a `Function`:
+
+```dart
+class Callable {
+ void call() {}
+}
+
+void callIt(void Function() f) {
+ f();
+}
+
+void f() {
+ callIt([!Callable()!]);
+}
+```
+
+#### Common fixes
+
+Explicitly tear off the `call` method:
+
+```dart
+class Callable {
+ void call() {}
+}
+
+void callIt(void Function() f) {
+ f();
+}
+
+void f() {
+ callIt(Callable().call);
+}
+```
+
+### invalid_use_of_do_not_submit_member
+
+_Uses of '{0}' should not be submitted to source control._
+
+#### Description
+
+The analyzer produces this diagnostic when a member that is annotated with
+[`@doNotSubmit`][meta-doNotSubmit] is referenced outside of a member
+declaration that is also annotated with `@doNotSubmit`.
+
+#### Example
+
+Given a file `a.dart` containing the following declaration:
+
+```dart
+import 'package:meta/meta.dart';
+
+@doNotSubmit
+void emulateCrash() { /* ... */ }
+```
+
+The following code produces this diagnostic because the declaration is
+being referenced outside of a member that is also annotated with
+`@doNotSubmit`:
+
+```dart
+import 'a.dart';
+
+void f() {
+ [!emulateCrash!]();
+}
+```
+
+#### Common fixes
+
+Most commonly, when complete with local testing, the reference to the
+member should be removed.
+
+If building additional functionality on top of the member, annotate the
+newly added member with `@doNotSubmit` as well:
+
+```dart
+import 'package:meta/meta.dart';
+
+import 'a.dart';
+
+@doNotSubmit
+void emulateCrashWithOtherFunctionality() {
+ emulateCrash();
+ // do other things.
+}
+```
+
+### library_names
+
+_The library name '{0}' isn't a lower\_case\_with\_underscores identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a library doesn't
+use the lower_case_with_underscores naming convention.
+
+#### Example
+
+The following code produces this diagnostic because the library name
+`libraryName` isn't a lower_case_with_underscores identifier:
+
+```dart
+library [!libraryName!];
+```
+
+#### Common fixes
+
+If the library name is not required, then remove the library name:
+
+```dart
+library;
+```
+
+If the library name is required, then convert it to use the
+lower_case_with_underscores naming convention:
+
+```dart
+library library_name;
+```
+
+### library_prefixes
+
+_The prefix '{0}' isn't a lower\_case\_with\_underscores identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when an import prefix doesn't use
+the lower_case_with_underscores naming convention.
+
+#### Example
+
+The following code produces this diagnostic because the prefix
+`ffiSupport` isn't a lower_case_with_underscores identifier:
+
+```dart
+import 'package:ffi/ffi.dart' as [!ffiSupport!];
+```
+
+#### Common fixes
+
+Convert the prefix to use the lower_case_with_underscores naming
+convention:
+
+```dart
+import 'package:ffi/ffi.dart' as ffi_support;
+```
+
+### library_private_types_in_public_api
+
+_Invalid use of a private type in a public API._
+
+#### Description
+
+The analyzer produces this diagnostic when a type that is not part of the
+public API of a library is referenced in the public API of that library.
+
+Using a private type in a public API can make the API unusable outside the
+defining library.
+
+#### Example
+
+The following code produces this diagnostic because the parameter `c` of
+the public function `f` has a type that is library private (`_C`):
+
+```dart
+void f([!_C!] c) {}
+
+class _C {}
+```
+
+#### Common fixes
+
+If the API doesn't need to be used outside the defining library, then make
+it private:
+
+```dart
+void _f(_C c) {}
+
+class _C {}
+```
+
+If the API needs to be part of the public API of the library, then either
+use a different type that's public, or make the referenced type public:
+
+```dart
+void f(C c) {}
+
+class C {}
+```
+
+### literal_only_boolean_expressions
+
+_The Boolean expression has a constant value._
+
+#### Description
+
+The analyzer produces this diagnostic when the value of the condition in
+an `if` or loop statement is known to be either always `true` or always
+`false`. An exception is made for a `while` loop whose condition is the
+Boolean literal `true`.
+
+#### Examples
+
+The following code produces this diagnostic because the condition will
+always evaluate to `true`:
+
+```dart
+void f() {
+ [!if (true) {!]
+ [!print('true');!]
+ [!}!]
+}
+```
+
+The lint will evaluate a subset of expressions that are composed of
+constants, so the following code will also produce this diagnostic because
+the condition will always evaluate to `false`:
+
+```dart
+void g(int i) {
+ [!if (1 == 0 || 3 > 4) {!]
+ [!print('false');!]
+ [!}!]
+}
+```
+
+#### Common fixes
+
+If the condition is wrong, then correct the condition so that it's value
+can't be known at compile time:
+
+```dart
+void g(int i) {
+ if (i == 0 || i > 4) {
+ print('false');
+ }
+}
+```
+
+If the condition is correct, then simplify the code to not evaluate the
+condition:
+
+```dart
+void f() {
+ print('true');
+}
+```
+
+### no_adjacent_strings_in_list
+
+_Don't use adjacent strings in a list literal._
+
+#### Description
+
+The analyzer produces this diagnostic when two string literals are
+adjacent in a list literal. Adjacent strings in Dart are concatenated
+together to form a single string, but the intent might be for each string
+to be a separate element in the list.
+
+#### Example
+
+The following code produces this diagnostic because the strings `'a'` and
+`'b'` are adjacent:
+
+```dart
+List list = [[!'a' 'b'!], 'c'];
+```
+
+#### Common fixes
+
+If the two strings are intended to be separate elements of the list, then
+add a comma between them:
+
+```dart
+List list = ['a', 'b', 'c'];
+```
+
+If the two strings are intended to be a single concatenated string, then
+either manually merge the strings:
+
+```dart
+List list = ['ab', 'c'];
+```
+
+Or use the `+` operator to concatenate the strings:
+
+```dart
+List list = ['a' + 'b', 'c'];
+```
+
+### no_duplicate_case_values
+
+_The value of the case clause ('{0}') is equal to the value of an earlier case
+clause ('{1}')._
+
+#### Description
+
+The analyzer produces this diagnostic when two or more `case` clauses in
+the same `switch` statement have the same value.
+
+Any `case` clauses after the first can't be executed, so having duplicate
+`case` clauses is misleading.
+
+This diagnostic is often the result of either a typo or a change to the
+value of a constant.
+
+#### Example
+
+The following code produces this diagnostic because two case clauses have
+the same value (1):
+
+```dart
+// @dart = 2.14
+void f(int v) {
+ switch (v) {
+ case 1:
+ break;
+ case [!1!]:
+ break;
+ }
+}
+```
+
+#### Common fixes
+
+If one of the clauses should have a different value, then change the value
+of the clause:
+
+```dart
+void f(int v) {
+ switch (v) {
+ case 1:
+ break;
+ case 2:
+ break;
+ }
+}
+```
+
+If the value is correct, then merge the statements into a single clause:
+
+```dart
+void f(int v) {
+ switch (v) {
+ case 1:
+ break;
+ }
+}
+```
+
+### no_leading_underscores_for_library_prefixes
+
+_The library prefix '{0}' starts with an underscore._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a prefix declared
+on an import starts with an underscore.
+
+Library prefixes are inherently not visible outside the declaring library,
+so a leading underscore indicating private adds no value.
+
+#### Example
+
+The following code produces this diagnostic because the prefix `_core`
+starts with an underscore:
+
+```dart
+import 'dart:core' as [!_core!];
+```
+
+#### Common fixes
+
+Remove the underscore:
+
+```dart
+import 'dart:core' as core;
+```
+
+### no_leading_underscores_for_local_identifiers
+
+_The local variable '{0}' starts with an underscore._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a local variable
+starts with an underscore.
+
+Local variables are inherently not visible outside the declaring library,
+so a leading underscore indicating private adds no value.
+
+#### Example
+
+The following code produces this diagnostic because the parameter `_s`
+starts with an underscore:
+
+```dart
+int f(String [!_s!]) => _s.length;
+```
+
+#### Common fixes
+
+Remove the underscore:
+
+```dart
+int f(String s) => s.length;
+```
+
+### no_logic_in_create_state
+
+_Don't put any logic in 'createState'._
+
+#### Description
+
+The analyzer produces this diagnostic when an implementation of
+`createState` in a subclass of `StatefulWidget` contains any logic other
+than the return of the result of invoking a zero argument constructor.
+
+#### Examples
+
+The following code produces this diagnostic because the constructor
+invocation has arguments:
+
+```dart
+import 'package:flutter/material.dart';
+
+class MyWidget extends StatefulWidget {
+ @override
+ MyState createState() => [!MyState(0)!];
+}
+
+class MyState extends State {
+ int x;
+
+ MyState(this.x);
+}
+```
+
+#### Common fixes
+
+Rewrite the code so that `createState` doesn't contain any logic:
+
+```dart
+import 'package:flutter/material.dart';
+
+class MyWidget extends StatefulWidget {
+ @override
+ MyState createState() => MyState();
+}
+
+class MyState extends State {
+ int x = 0;
+
+ MyState();
+}
+```
+
+### no_wildcard_variable_uses
+
+_The referenced identifier is a wildcard._
+
+#### Description
+
+The analyzer produces this diagnostic when either a parameter or local
+variable whose name consists of only underscores is referenced. Such
+names will become non-binding in a future version of the Dart language,
+making the reference illegal.
+
+#### Example
+
+The following code produces this diagnostic because the name of the
+parameter consists of two underscores:
+
+```dart
+void f(int __) {
+ print([!__!]);
+}
+```
+
+The following code produces this diagnostic because the name of the
+local variable consists of a single underscore:
+
+```dart
+void f() {
+ int _ = 0;
+ print([!_!]);
+}
+```
+
+#### Common fixes
+
+If the variable or parameter is intended to be referenced, then give it a
+name that has at least one non-underscore character:
+
+```dart
+void f(int p) {
+ print(p);
+}
+```
+
+If the variable or parameter is not intended to be referenced, then
+replace the reference with a different expression:
+
+```dart
+void f() {
+ print(0);
+}
+```
+
+### non_constant_identifier_names
+
+_The variable name '{0}' isn't a lowerCamelCase identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a class member,
+top-level declaration, variable, parameter, named parameter, or named
+constructor that isn't declared to be `const`, doesn't use the
+lowerCamelCase convention.
+
+#### Example
+
+The following code produces this diagnostic because the top-level variable
+`Count` doesn't start with a lowercase letter:
+
+```dart
+var [!Count!] = 0;
+```
+
+#### Common fixes
+
+Change the name in the declaration to follow the lowerCamelCase
+convention:
+
+```dart
+var count = 0;
+```
+
+### null_check_on_nullable_type_parameter
+
+_The null check operator shouldn't be used on a variable whose type is a
+potentially nullable type parameter._
+
+#### Description
+
+The analyzer produces this diagnostic when a null check operator is used
+on a variable whose type is `T?`, where `T` is a type parameter that
+allows the type argument to be nullable (either has no bound or has a
+bound that is nullable).
+
+Given a generic type parameter `T` which has a nullable bound, it is very
+easy to introduce erroneous null checks when working with a variable of
+type `T?`. Specifically, it is not uncommon to have `T? x;` and want to
+assert that `x` has been set to a valid value of type `T`. A common
+mistake is to do so using `x!`. This is almost always incorrect, because
+if `T` is a nullable type, `x` may validly hold `null` as a value of type
+`T`.
+
+#### Example
+
+The following code produces this diagnostic because `t` has the type `T?`
+and `T` allows the type argument to be nullable (because it has no
+`extends` clause):
+
+```dart
+T f(T? t) => t[!!!];
+```
+
+#### Common fixes
+
+Use the type parameter to cast the variable:
+
+```dart
+T f(T? t) => t as T;
+```
+
+### overridden_fields
+
+_Field overrides a field inherited from '{0}'._
+
+#### Description
+
+The analyzer produces this diagnostic when a class defines a field that
+overrides a field from a superclass.
+
+Overriding a field with another field causes the object to have two
+distinct fields, but because the fields have the same name only one of the
+fields can be referenced in a given scope. That can lead to confusion
+where a reference to one of the fields can be mistaken for a reference to
+the other.
+
+#### Example
+
+The following code produces this diagnostic because the field `f` in `B`
+shadows the field `f` in `A`:
+
+```dart
+class A {
+ int f = 1;
+}
+
+class B extends A {
+ @override
+ int [!f!] = 2;
+}
+```
+
+#### Common fixes
+
+If the two fields are representing the same property, then remove the
+field from the subclass:
+
+```dart
+class A {
+ int f = 1;
+}
+
+class B extends A {}
+```
+
+If the two fields should be distinct, then rename one of the fields:
+
+```dart
+class A {
+ int f = 1;
+}
+
+class B extends A {
+ int g = 2;
+}
+```
+
+If the two fields are related in some way, but can't be the same, then
+find a different way to implement the semantics you need.
+
+### package_names
+
+_The package name '{0}' isn't a lower\_case\_with\_underscores identifier._
+
+#### Description
+
+The analyzer produces this diagnostic when the name of a package doesn't
+use the lower_case_with_underscores naming convention.
+
+#### Example
+
+The following code produces this diagnostic because the name of the
+package uses the lowerCamelCase naming convention:
+
+```yaml
+name: [!somePackage!]
+```
+
+#### Common fixes
+
+Rewrite the name of the package using the lower_case_with_underscores
+naming convention:
+
+```yaml
+name: some_package
+```
+
+### package_prefixed_library_names
+
+_The library name is not a dot-separated path prefixed by the package name._
+
+#### Description
+
+The analyzer produces this diagnostic when a library has a name that
+doesn't follow these guidelines:
+
+- Prefix all library names with the package name.
+- Make the entry library have the same name as the package.
+- For all other libraries in a package, after the package name add the
+ dot-separated path to the library's Dart file.
+- For libraries under `lib`, omit the top directory name.
+
+For example, given a package named `my_package`, here are the library
+names for various files in the package:
+
+
+#### Example
+
+Assuming that the file containing the following code is not in a file
+named `special.dart` in the `lib` directory of a package named `something`
+(which would be an exception to the rule), the analyzer produces this
+diagnostic because the name of the library doesn't conform to the
+guidelines above:
+
+```dart
+library [!something.special!];
+```
+
+#### Common fixes
+
+Change the name of the library to conform to the guidelines.
+
+### prefer_adjacent_string_concatenation
+
+_String literals shouldn't be concatenated by the '+' operator._
+
+#### Description
+
+The analyzer produces this diagnostic when the `+` operator is used to
+concatenate two string literals.
+
+#### Example
+
+The following code produces this diagnostic because two string literals
+are being concatenated by using the `+` operator:
+
+```dart
+var s = 'a' [!+!] 'b';
+```
+
+#### Common fixes
+
+Remove the operator:
+
+```dart
+var s = 'a' 'b';
+```
+
+### prefer_collection_literals
+
+_Unnecessary constructor invocation._
+
+#### Description
+
+The analyzer produces this diagnostic when a constructor is used to create
+a list, map, or set, but a literal would produce the same result.
+
+#### Example
+
+The following code produces this diagnostic because the constructor for
+`Map` is being used to create a map that could also be created using a
+literal:
+
+```dart
+var m = [!Map()!];
+```
+
+#### Common fixes
+
+Use the literal representation:
+
+```dart
+var m = {};
+```
+
+### prefer_conditional_assignment
+
+_The 'if' statement could be replaced by a null-aware assignment._
+
+#### Description
+
+The analyzer produces this diagnostic when an assignment to a variable is
+conditional based on whether the variable has the value `null` and the
+`??=` operator could be used instead.
+
+#### Example
+
+The following code produces this diagnostic because the parameter `s` is
+being compared to `null` in order to determine whether to assign a
+different value:
+
+```dart
+int f(String? s) {
+ [!if (s == null) {!]
+ [!s = '';!]
+ [!}!]
+ return s.length;
+}
+```
+
+#### Common fixes
+
+Use the `??=` operator instead of an explicit `if` statement:
+
+```dart
+int f(String? s) {
+ s ??= '';
+ return s.length;
+}
+```
+
+### prefer_const_constructors
+
+_Use 'const' with the constructor to improve performance._
+
+#### Description
+
+The analyzer produces this diagnostic when an invocation of a const
+constructor isn't either preceded by `const` or in a [constant context][].
+
+#### Example
+
+The following code produces this diagnostic because the invocation of the
+`const` constructor is neither prefixed by `const` nor in a
+[constant context][]:
+
+```dart
+class C {
+ const C();
+}
+
+C c = [!C()!];
+```
+
+#### Common fixes
+
+If the context can be made a [constant context][], then do so:
+
+```dart
+class C {
+ const C();
+}
+
+const C c = C();
+```
+
+If the context can't be made a [constant context][], then add `const`
+before the constructor invocation:
+
+```dart
+class C {
+ const C();
+}
+
+C c = const C();
+```
+
+### prefer_const_constructors_in_immutables
+
+_Constructors in '@immutable' classes should be declared as 'const'._
+
+#### Description
+
+The analyzer produces this diagnostic when a non-`const` constructor is
+found in a class that has the `@immutable` annotation.
+
+#### Example
+
+The following code produces this diagnostic because the constructor in `C`
+isn't declared as `const` even though `C` has the `@immutable` annotation:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ [!C!](this.f);
+}
+```
+
+#### Common fixes
+
+If the class really is intended to be immutable, then add the `const`
+modifier to the constructor:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ const C(this.f);
+}
+```
+
+If the class is mutable, then remove the `@immutable` annotation:
+
+```dart
+class C {
+ final f;
+
+ C(this.f);
+}
+```
+
+### prefer_const_declarations
+
+_Use 'const' for final variables initialized to a constant value._
+
+#### Description
+
+The analyzer produces this diagnostic when a top-level variable, static
+field, or local variable is marked as `final` and is initialized to a
+constant value.
+
+#### Examples
+
+The following code produces this diagnostic because the top-level variable
+`v` is both `final` and initialized to a constant value:
+
+```dart
+[!final v = const []!];
+```
+
+The following code produces this diagnostic because the static field `f`
+is both `final` and initialized to a constant value:
+
+```dart
+class C {
+ static [!final f = const []!];
+}
+```
+
+The following code produces this diagnostic because the local variable `v`
+is both `final` and initialized to a constant value:
+
+```dart
+void f() {
+ [!final v = const []!];
+ print(v);
+}
+```
+
+#### Common fixes
+
+Replace the keyword `final` with `const` and remove `const` from the
+initializer:
+
+```dart
+class C {
+ static const f = [];
+}
+```
+
+### prefer_const_literals_to_create_immutables
+
+_Use 'const' literals as arguments to constructors of '@immutable' classes._
+
+#### Description
+
+The analyzer produces this diagnostic when a non-const list, map, or set
+literal is passed as an argument to a constructor declared in a class
+annotated with `@immutable`.
+
+#### Example
+
+The following code produces this diagnostic because the list literal
+(`[1]`) is being passed to a constructor in an immutable class but isn't
+a constant list:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ const C(this.f);
+}
+
+C c = C([![1]!]);
+```
+
+#### Common fixes
+
+If the context can be made a [constant context][], then do so:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ const C(this.f);
+}
+
+const C c = C([1]);
+```
+
+If the context can't be made a [constant context][] but the constructor
+can be invoked using `const`, then add `const` before the constructor
+invocation:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ const C(this.f);
+}
+
+C c = const C([1]);
+```
+
+If the context can't be made a [constant context][] and the constructor
+can't be invoked using `const`, then add the keyword `const` before the
+collection literal:
+
+```dart
+import 'package:meta/meta.dart';
+
+@immutable
+class C {
+ final f;
+
+ const C(this.f);
+}
+
+C c = C(const [1]);
+```
+
+### prefer_contains
+
+_Always false because indexOf is always greater or equal -1._
+
+_Always true because indexOf is always greater or equal -1._
+
+_Unnecessary use of 'indexOf' to test for containment._
+
+#### Description
+
+The analyzer produces this diagnostic when the method `indexOf` is used and
+the result is only compared with `-1` or `0` in a way where the semantics
+are equivalent to using `contains`.
+
+#### Example
+
+The following code produces this diagnostic because the condition in the
+`if` statement is checking to see whether the list contains the string:
+
+```dart
+void f(List l, String s) {
+ if ([!l.indexOf(s) < 0!]) {
+ // ...
+ }
+}
+```
+
+#### Common fixes
+
+Use `contains` instead, negating the condition when necessary:
+
+```dart
+void f(List l, String s) {
+ if (l.contains(s)) {
+ // ...
+ }
+}
+```
+
+### prefer_final_fields
+
+_The private field {0} could be 'final'._
+
+#### Description
+
+The analyzer produces this diagnostic when a private field is only
+assigned one time. The field can be initialized in multiple constructors
+and still be flagged because only one of those constructors can ever run.
+
+#### Example
+
+The following code produces this diagnostic because the field `_f` is only
+assigned one time, in the field's initializer:
+
+```dart
+class C {
+ int [!_f = 1!];
+
+ int get f => _f;
+}
+```
+
+#### Common fixes
+
+Mark the field `final`:
+
+```dart
+class C {
+ final int _f = 1;
+
+ int get f => _f;
+}
+```
+
+### prefer_for_elements_to_map_fromiterable
+
+_Use 'for' elements when building maps from iterables._
+
+#### Description
+
+The analyzer produces this diagnostic when `Map.fromIterable` is used to
+build a map that could be built using the `for` element.
+
+#### Example
+
+The following code produces this diagnostic because `fromIterable` is
+being used to build a map that could be built using a `for` element:
+
+```dart
+void f(Iterable data) {
+ [!Map.fromIterable(!]
+ [!data,!]
+ [!key: (element) => element,!]
+ [!value: (element) => element.length,!]
+ [!)!];
+}
+```
+
+#### Common fixes
+
+Use a `for` element to build the map:
+
+```dart
+void f(Iterable data) {
+ {
+ for (var element in data)
+ element: element.length
+ };
+}
+```
+
+### prefer_function_declarations_over_variables
+
+_Use a function declaration rather than a variable assignment to bind a function
+to a name._
+
+#### Description
+
+The analyzer produces this diagnostic when a closure is assigned to a
+local variable and the local variable is not re-assigned anywhere.
+
+#### Example
+
+The following code produces this diagnostic because the local variable `f`
+is initialized to be a closure and isn't assigned any other value:
+
+```dart
+void g() {
+ var [!f = (int i) => i * 2!];
+ f(1);
+}
+```
+
+#### Common fixes
+
+Replace the local variable with a local function:
+
+```dart
+void g() {
+ int f(int i) => i * 2;
+ f(1);
+}
+```
+
+### prefer_generic_function_type_aliases
+
+_Use the generic function type syntax in 'typedef's._
+
+#### Description
+
+The analyzer produces this diagnostic when a typedef is written using the
+older syntax for function type aliases in which the name being declared is
+embedded in the function type.
+
+#### Example
+
+The following code produces this diagnostic because it uses the older
+syntax:
+
+```dart
+typedef void [!F!]();
+```
+
+#### Common fixes
+
+Rewrite the typedef to use the newer syntax:
+
+```dart
+typedef F = void Function();
+```
+
+### prefer_if_null_operators
+
+_Use the '??' operator rather than '?:' when testing for 'null'._
+
+#### Description
+
+The analyzer produces this diagnostic when a conditional expression (using
+the `?:` operator) is used to select a different value when a local
+variable is `null`.
+
+#### Example
+
+The following code produces this diagnostic because the variable `s` is
+being compared to `null` so that a different value can be returned when
+`s` is `null`:
+
+```dart
+String f(String? s) => [!s == null ? '' : s!];
+```
+
+#### Common fixes
+
+Use the if-null operator instead:
+
+```dart
+String f(String? s) => s ?? '';
+```
+
+### prefer_initializing_formals
+
+_Use an initializing formal to assign a parameter to a field._
+
+#### Description
+
+The analyzer produces this diagnostic when a constructor parameter is used
+to initialize a field without modification.
+
+#### Example
+
+The following code produces this diagnostic because the parameter `c` is
+only used to set the field `c`:
+
+```dart
+class C {
+ int c;
+
+ C(int c) : [!this.c = c!];
+}
+```
+
+#### Common fixes
+
+Use an initializing formal parameter to initialize the field:
+
+```dart
+class C {
+ int c;
+
+ C(this.c);
+}
+```
+
+### prefer_inlined_adds
+
+_The addition of a list item could be inlined._
+
+_The addition of multiple list items could be inlined._
+
+#### Description
+
+The analyzer produces this diagnostic when the methods `add` and `addAll`
+are invoked on a list literal where the elements being added could be
+included in the list literal.
+
+#### Example
+
+The following code produces this diagnostic because the `add` method is
+being used to add `b`, when it could have been included directly in the
+list literal:
+
+```dart
+List f(String a, String b) {
+ return [a]..[!add!](b);
+}
+```
+
+The following code produces this diagnostic because the `addAll` method is
+being used to add the elements of `b`, when it could have been included
+directly in the list literal:
+
+```dart
+List f(String a, List b) {
+ return [a]..[!addAll!](b);
+}
+```
+
+#### Common fixes
+
+If the `add` method is being used, then make the argument an element of
+the list and remove the invocation:
+
+```dart
+List f(String a, String b) {
+ return [a, b];
+}
+```
+
+If the `addAll` method is being used, then use the spread operator on the
+argument to add its elements to the list and remove the invocation:
+
+```dart
+List f(String a, List b) {
+ return [a, ...b];
+}
+```
+
+### prefer_interpolation_to_compose_strings
+
+_Use interpolation to compose strings and values._
+
+#### Description
+
+The analyzer produces this diagnostic when string literals and computed
+strings are being concatenated using the `+` operator, but string
+interpolation would achieve the same result.
+
+#### Example
+
+The following code produces this diagnostic because the elements of the
+list `l` are being concatenated with other strings using the `+` operator:
+
+```dart
+String f(List l) {
+ return [!'(' + l[0] + ', ' + l[1] + ')'!];
+}
+```
+
+#### Common fixes
+
+Use string interpolation:
+
+```dart
+String f(List l) {
+ return '(${l[0]}, ${l[1]})';
+}
+```
+
+### prefer_is_empty
+
+_The comparison is always 'false' because the length is always greater than or
+equal to 0._
+
+_The comparison is always 'true' because the length is always greater than or
+equal to 0._
+
+_Use 'isEmpty' instead of 'length' to test whether the collection is empty._
+
+_Use 'isNotEmpty' instead of 'length' to test whether the collection is empty._
+
+#### Description
+
+The analyzer produces this diagnostic when the result of invoking either
+`Iterable.length` or `Map.length` is compared for equality with zero
+(`0`).
+
+#### Example
+
+The following code produces this diagnostic because the result of invoking
+`length` is checked for equality with zero:
+
+```dart
+int f(Iterable p) => [!p.length == 0!] ? 0 : p.first;
+```
+
+#### Common fixes
+
+Replace the use of `length` with a use of either `isEmpty` or
+`isNotEmpty`:
+
+```dart
+void f(Iterable p) => p.isEmpty ? 0 : p.first;
+```
+
+### prefer_is_not_empty
+
+_Use 'isNotEmpty' rather than negating the result of 'isEmpty'._
+
+#### Description
+
+The analyzer produces this diagnostic when the result of invoking
+`Iterable.isEmpty` or `Map.isEmpty` is negated.
+
+#### Example
+
+The following code produces this diagnostic because the result of invoking
+`Iterable.isEmpty` is negated:
+
+```dart
+void f(Iterable p) => [!!p.isEmpty!] ? p.first : 0;
+```
+
+#### Common fixes
+
+Rewrite the code to use `isNotEmpty`:
+
+```dart
+void f(Iterable p) => p.isNotEmpty ? p.first : 0;
+```
+
+### prefer_is_not_operator
+
+_Use the 'is!' operator rather than negating the value of the 'is' operator._
+
+#### Description
+
+The analyzer produces this diagnostic when the prefix `!` operator is used
+to negate the result of an `is` test.
+
+#### Example
+
+The following code produces this diagnostic because the result of testing
+to see whether `o` is a `String` is negated using the prefix `!` operator:
+
+```dart
+String f(Object o) {
+ if ([!!(o is String)!]) {
+ return o.toString();
+ }
+ return o;
+}
+```
+
+#### Common fixes
+
+Use the `is!` operator instead:
+
+```dart
+String f(Object o) {
+ if (o is! String) {
+ return o.toString();
+ }
+ return o;
+}
+```
+
+### prefer_iterable_wheretype
+
+_Use 'whereType' to select elements of a given type._
+
+#### Description
+
+The analyzer produces this diagnostic when the method `Iterable.where` is
+being used to filter elements based on their type.
+
+#### Example
+
+The following code produces this diagnostic because the method `where` is
+being used to access only the strings within the iterable:
+
+```dart
+Iterable