variable_app_icon 0.0.1 copy "variable_app_icon: ^0.0.1" to clipboard
variable_app_icon: ^0.0.1 copied to clipboard

outdated

A plugin to use multiple app icon on iOS

variable_app_icon #

A plugin to use multiple app icon on iOS.

If you don't know yet, you can use multiple app icon in an iOS app from 10.3. You can accomplish this in your flutter app by using this plugin

Getting Started #

First, add variable_app_icon as a dependency in your pubspec.yaml file.

dependencies:
  variable_app_icon: ^0.0.1

Don't forget to flutter pub get.

Usage #

1. Setting the app icons #

Open your ios project i.e. Runner in Xcode, then go to Build Settings tab. Now search icon, you will find Assets Catalog Compiler Options. Set Include All App Icon Assets to Yes. Then add all the icons name to the Alternate App Icon Sets. Congratulations, you have completed the hard work. Let's have some dart code.

2. From the flutter side #

Call this method to set other app icon.

await VariableAppIcon.changeAppIcon(name); 

But, set empty string, if you want to set the primary icon again. Calling this method with primary icon name, has no effect

await VariableAppIcon.changeAppIcon(""); // to set the app primary icon

You are done. Enjoy!

Demo #

https://user-images.githubusercontent.com/22527366/191091356-817b69f0-1a84-4620-87ae-5969d519b4eb.MP4

Support the package (optional) #

If you find this package useful, you can support it by giving it a star.

Credits #

This package is created by Shahriar Nasim Nafi