[flutter_tools][web] add favicon to template and update index.html (#49237)
diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart
index c9a5156..6c0f607 100644
--- a/dev/bots/analyze.dart
+++ b/dev/bots/analyze.dart
@@ -824,6 +824,10 @@
// examples/flutter_gallery/web/icons/Icon-512.png
Hash256(0xBACCB205AE45f0B4, 0x21BE1657259B4943, 0xAC40C95094AB877F, 0x3BCBE12CD544DCBE),
+ // packages/flutter_tools/templates/app/web/favicon.png.copy.tmpl
+ // examples/flutter_gallery/web/favicon.png
+ Hash256(0x7AB2525F4B86B65D, 0x3E4C70358A17E5A1, 0xAAF6F437f99CBCC0, 0x46DAD73d59BB9015),
+
// GALLERY ICONS
// examples/flutter_gallery/android/app/src/main/res/mipmap-hdpi/ic_background.png
@@ -1056,7 +1060,7 @@
assert(
_grandfatheredBinaries
.expand<int>((Hash256 hash) => <int>[hash.a, hash.b, hash.c, hash.d])
- .reduce((int value, int element) => value ^ element) == 0xBFC18DE113B5AE8E // Please do not modify this line.
+ .reduce((int value, int element) => value ^ element) == 0x17138C817203D1A7 // Please do not modify this line.
);
grandfatheredBinaries ??= _grandfatheredBinaries;
if (!Platform.isWindows) { // TODO(ianh): Port this to Windows
diff --git a/examples/flutter_gallery/web/favicon.png b/examples/flutter_gallery/web/favicon.png
new file mode 100644
index 0000000..8aaa46a
--- /dev/null
+++ b/examples/flutter_gallery/web/favicon.png
Binary files differ
diff --git a/examples/flutter_gallery/web/index.html b/examples/flutter_gallery/web/index.html
index 9e8e09b..d670d63 100644
--- a/examples/flutter_gallery/web/index.html
+++ b/examples/flutter_gallery/web/index.html
@@ -13,6 +13,7 @@
<meta name="apple-mobile-web-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="Flutter Gallery">
<link rel="apple-touch-icon" href="/icons/Icon-192.png">
+ <link rel="shortcut icon" type="image/png" href="/favicon.png"/>
<title>Flutter Gallery</title>
<link rel="manifest" href="/manifest.json">
diff --git a/packages/flutter_tools/templates/app/web/favicon.png.copy.tmpl b/packages/flutter_tools/templates/app/web/favicon.png.copy.tmpl
new file mode 100644
index 0000000..8aaa46a
--- /dev/null
+++ b/packages/flutter_tools/templates/app/web/favicon.png.copy.tmpl
Binary files differ
diff --git a/packages/flutter_tools/templates/app/web/index.html.tmpl b/packages/flutter_tools/templates/app/web/index.html.tmpl
index 8ec7bd8..a74f53e 100644
--- a/packages/flutter_tools/templates/app/web/index.html.tmpl
+++ b/packages/flutter_tools/templates/app/web/index.html.tmpl
@@ -11,6 +11,9 @@
<meta name="apple-mobile-web-app-title" content="{{projectName}}">
<link rel="apple-touch-icon" href="/icons/Icon-192.png">
+ <!-- Favicon -->
+ <link rel="shortcut icon" type="image/png" href="/favicon.png"/>
+
<title>{{projectName}}</title>
<link rel="manifest" href="/manifest.json">
</head>