app_icon_changer 1.0.1 copy "app_icon_changer: ^1.0.1" to clipboard
app_icon_changer: ^1.0.1 copied to clipboard

outdated

The package allows the user to change iOS app icons directly from Flutter code. The package uses Method channels to implement icon changes.

app_icon_changer #

Change your app icon right from your Flutter code! [iOS only]

Runs on iOS 10.3 and above

Usage #

Settings for iOS #

  • Open iOS module in XCode.
  • Right click on Runner folder and select New Group without Folder
  • Add your icons in the folder
  • Open Info.plist as source code and add the following code
<key>CFBundleIcons</key>
    <dict>
        <key>CFBundleAlternateIcons</key>
        <dict>
            <key>icon-white</key>
            <dict>
                <key>UIPrerenderedIcon</key>
                <string>NO</string>
                <key>CFBundleIconFiles</key>
                <array>
                    <string>icon-white</string>
                </array>
            </dict>
            <key>icon-black</key>
            <dict>
                <key>UIPrerenderedIcon</key>
                <string>NO</string>
                <key>CFBundleIconFiles</key>
                <array>
                    <string>icon-black</string>
                </array>
            </dict>
        </dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>icon</string>
            </array>
        </dict>
        <key>UINewsstandIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string></string>
            </array>
            <key>UINewsstandBindingEdge</key>
            <string>UINewsstandBindingEdgeLeft</string>
            <key>UINewsstandBindingType</key>
            <string>UINewsstandBindingTypeMagazine</string>
        </dict>
    </dict>

Replace icon-white and icon-black with your icon names. You can also add more keys depending on the number of icons you want to keep.

Dart side #

Add the dependency in pubspec.yaml and call the package through code like this:

Future<void> setAppIcon(String name) async {
    try {
      await AppIconChanger.changeIcon(name);
    } on PlatformException {
      print('Failed to change app icon');
    }
    if (!mounted) return;
  }
9
likes
0
points
12
downloads

Publisher

unverified uploader

Weekly Downloads

The package allows the user to change iOS app icons directly from Flutter code. The package uses Method channels to implement icon changes.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on app_icon_changer

Packages that implement app_icon_changer