Skip to content

Commit e57229d

Browse files
mike-500MarkOSullivan94
authored andcommitted
Fix remove alpha for iOS
1 parent 323cbff commit e57229d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ios.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ void createIcons(FlutterLauncherIconsConfig config, String? flavor) {
5454
}
5555
// decodeImageFile shows error message if null
5656
// so can return here if image is null
57-
final Image? image = decodeImage(File(filePath).readAsBytesSync());
57+
Image? image = decodeImage(File(filePath).readAsBytesSync());
5858
if (image == null) {
5959
return;
6060
}
61-
if (config.removeAlphaIOS) {
62-
image.remapChannels(ChannelOrder.rgb);
61+
if (config.removeAlphaIOS && image.hasAlpha) {
62+
image = image.convert(numChannels: 3);
6363
}
6464
if (image.hasAlpha) {
6565
print(

0 commit comments

Comments
 (0)