Skip to content

Commit

Permalink
update ios app logo size
Browse files Browse the repository at this point in the history
  • Loading branch information
gusibi committed Aug 25, 2024
1 parent 539d8c3 commit a895cde
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
6 changes: 3 additions & 3 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -472,7 +472,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -521,7 +521,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
28 changes: 18 additions & 10 deletions lib/src/features/app_icon/app_icon_ios_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,19 @@ class _iOSAppIconEditorPageState extends State<IOSAppIconEditorPage> {
_previewImages = {};
});

int index = 1;
double lastSize = 0;
for (double size in sizeList) {
final resizedImage =
await _resizeImage(result, size.toInt(), size.toInt());
if (size == lastSize) {
index++;
} else if (size != lastSize) {
index = 1;
}
lastSize = size;
final resizedImage = await _resizeImage(
result, size.toInt() * index, size.toInt() * index);
setState(() {
_previewImages[size.toInt()] = resizedImage;
_previewImages[size.toInt() * index] = resizedImage;
});
}
}
Expand Down Expand Up @@ -457,14 +465,14 @@ class _iOSAppIconEditorPageState extends State<IOSAppIconEditorPage> {
int index = 1;
double lastSize = 0;
for (var size in sizeList) {
if (size == lastSize) {
index++;
} else if (size != lastSize) {
index = 1;
}
lastSize = size;
for (var entry in _previewImages.entries) {
if (entry.key == size.toInt()) {
if (size == lastSize) {
index++;
} else if (size != lastSize) {
index = 1;
}
lastSize = size;
if (entry.key == size.toInt() * index) {
File file = File(
'$selectedDirectory/$fileName-${size}x${size}@${index}x.png');
if (size == size.toInt()) {
Expand Down

0 comments on commit a895cde

Please sign in to comment.