flutter_icon_dynamic 0.0.2
flutter_icon_dynamic: ^0.0.2 copied to clipboard
Change your Android and iOS app icon dynamically without any hassle!
π§ Flutter Icon Dynamic Plugin #
A Flutter plugin for changing the app icon dynamically. Available for both Android and iOS.
π₯ Features #
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 |
π¨ Getting Started #
Check out the example
directory to see the plugin in action.
π€ Android
-
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>
π iOS
-
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.