Add maskable icons to improve lighthouse score (#83182)
This commit is contained in:
parent
fe7e161425
commit
b4148eb599
@ -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 = '../..';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user