Unverified Commit b4148eb5 authored by Aneesh Rao's avatar Aneesh Rao Committed by GitHub

Add maskable icons to improve lighthouse score (#83182)

parent fe7e1614
......@@ -27,7 +27,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
// Therefore, we control the version of flutter_gallery_assets so that
// existing tests do not fail when the package has a new version.
'flutter_gallery_assets': '^1.0.1',
'flutter_template_images': '3.0.0', // Must always exactly match flutter_tools template.
'flutter_template_images': '3.0.1', // Must always exactly match flutter_tools template.
// DART TEAM OWNED NNBD DEPS
'archive': '">=3.0.0-nullsafety.0"',
'async': '">=2.5.0-nullsafety.3"',
......
......@@ -17,7 +17,7 @@ dependencies:
coverage: 1.0.3
crypto: 3.0.1
file: 6.1.1
flutter_template_images: 3.0.0
flutter_template_images: 3.0.1
html: 0.15.0
http: 0.13.3
intl: 0.17.0
......@@ -110,4 +110,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true
# PUBSPEC CHECKSUM: 3695
# PUBSPEC CHECKSUM: 2996
......@@ -18,6 +18,18 @@
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}
......@@ -119,6 +119,8 @@
"templates/app/web/favicon.png.copy.tmpl",
"templates/app/web/icons/Icon-192.png.copy.tmpl",
"templates/app/web/icons/Icon-512.png.copy.tmpl",
"templates/app/web/icons/Icon-maskable-192.png.img.tmpl",
"templates/app/web/icons/Icon-maskable-512.png.img.tmpl",
"templates/app/web/index.html.tmpl",
"templates/app/web/manifest.json.tmpl",
"templates/app/windows.tmpl/.gitignore",
......
......@@ -1062,6 +1062,25 @@ void main() {
Logger: () => logger,
});
testUsingContext('app creates maskable icons for web', () async {
Cache.flutterRoot = '../..';
final CreateCommand command = CreateCommand();
final CommandRunner<void> runner = createTestCommandRunner(command);
await runner.run(<String>[
'create',
'--no-pub',
'--platforms=web',
projectDir.path,
]);
final Directory iconsDir = projectDir.childDirectory('web').childDirectory('icons');
expect(iconsDir.childFile('Icon-maskable-192.png'), exists);
expect(iconsDir.childFile('Icon-maskable-512.png'), exists);
});
testUsingContext('plugin uses new platform schema', () async {
Cache.flutterRoot = '../..';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment