A Flutter plugin for changing the app icon dynamically. Available for both Android and iOS.
Flutter Icon Dynamic Plugin | |
---|---|
✅ | Change dynamically the Android app icon |
✅ | Change dynamically the iOS app icon |
✅ | Check if changing dynamically the icon is supported |
✅ | Plugin contains tests |
Check out the example
directory to see the plugin in action.
-
Add your icons to the
android/app/src/main/res
directory. You can use both mipmap and drawable directories. -
Add the following to your
AndroidManifest.xml
inside the<application>
tag, for each icon you added in the previous step. Please keep in mind that theandroid:name
attribute must be unique for each icon, and must starts withappicon.
.
<activity-alias
android:name="appicon.sncf_connect_green"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/my_icon"
android:label="My app name"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
-
Add your icons to the
ios/Runner/Assets.xcassets
directory (right click iOS > New iOS App Icon). Create a new AppIcon set and add the icons to the set. -
In the Build Settings of your target, search for
Asset Catalog Compiler - Options
and set theInclude All App Icon Assets
to true. Then, in theAlternate App Icon Sets
list, add the names of the icons you added in the previous step.