Skip to content

Commit

Permalink
Merge pull request fluttercommunity#298 from bossly/master
Browse files Browse the repository at this point in the history
Added missed icon sizes for iOS
  • Loading branch information
RatakondalaArun authored Jul 26, 2022
2 parents dcc1c62 + e9d1417 commit 8affb1f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
42 changes: 42 additions & 0 deletions lib/ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ List<IosIconTemplate> iosIcons = <IosIconTemplate>[
IosIconTemplate(name: '-40x40@1x', size: 40),
IosIconTemplate(name: '-40x40@2x', size: 80),
IosIconTemplate(name: '-40x40@3x', size: 120),
IosIconTemplate(name: '-50x50@1x', size: 50),
IosIconTemplate(name: '-50x50@2x', size: 100),
IosIconTemplate(name: '-57x57@1x', size: 57),
IosIconTemplate(name: '-57x57@2x', size: 114),
IosIconTemplate(name: '-60x60@2x', size: 120),
IosIconTemplate(name: '-60x60@3x', size: 180),
IosIconTemplate(name: '-72x72@1x', size: 72),
IosIconTemplate(name: '-72x72@2x', size: 144),
IosIconTemplate(name: '-76x76@1x', size: 76),
IosIconTemplate(name: '-76x76@2x', size: 152),
IosIconTemplate(name: '-83.5x83.5@2x', size: 167),
Expand Down Expand Up @@ -248,6 +254,30 @@ List<Map<String, String>> createImageList(String fileNamePrefix) {
filename: '$fileNamePrefix[email protected]',
scale: '3x')
.toJson(),
ContentsImageObject(
size: '50x50',
idiom: 'iphone',
filename: '$fileNamePrefix[email protected]',
scale: '1x')
.toJson(),
ContentsImageObject(
size: '50x50',
idiom: 'iphone',
filename: '$fileNamePrefix[email protected]',
scale: '2x')
.toJson(),
ContentsImageObject(
size: '57x57',
idiom: 'iphone',
filename: '$fileNamePrefix[email protected]',
scale: '1x')
.toJson(),
ContentsImageObject(
size: '57x57',
idiom: 'iphone',
filename: '$fileNamePrefix[email protected]',
scale: '2x')
.toJson(),
ContentsImageObject(
size: '60x60',
idiom: 'iphone',
Expand Down Expand Up @@ -296,6 +326,18 @@ List<Map<String, String>> createImageList(String fileNamePrefix) {
filename: '$fileNamePrefix[email protected]',
scale: '2x')
.toJson(),
ContentsImageObject(
size: '72x72',
idiom: 'ipad',
filename: '$fileNamePrefix[email protected]',
scale: '1x')
.toJson(),
ContentsImageObject(
size: '72x72',
idiom: 'ipad',
filename: '$fileNamePrefix[email protected]',
scale: '2x')
.toJson(),
ContentsImageObject(
size: '76x76',
idiom: 'ipad',
Expand Down
4 changes: 2 additions & 2 deletions test/main_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import 'package:test/test.dart';
// Unit tests for main.dart
void main() {
test('iOS icon list is correct size', () {
expect(ios.iosIcons.length, 15);
expect(ios.iosIcons.length, 21);
});

test('Android icon list is correct size', () {
Expand All @@ -21,7 +21,7 @@ void main() {
test(
'iOS image list used to generate Contents.json for icon directory is correct size',
() {
expect(ios.createImageList('blah').length, 19);
expect(ios.createImageList('blah').length, 25);
});

test('pubspec.yaml file exists', () async {
Expand Down

0 comments on commit 8affb1f

Please sign in to comment.