![]() ![]() icon/path/here.png: This will generate a new launcher icons for the platform with the name you specify, without removing the old default existing Flutter launcher icon.false: Ignore making launcher icons for this platform.true: Override the default existing Flutter launcher icon for the platform specified.image_path: The location of the icon image file which you want to use as the app launcher icon.Shown below is the full list of attributes which you can specify within your Flutter Launcher Icons configuration. With the icon located in the image path specified above and given the name "launcher_icon" in the Android project and "Example-Icon" in the iOS project. In the above configuration, the package is setup to replace the existing launcher icons in both the Android and iOS project If you encounter any issues please report them here. Run the package #Īfter setting up the configuration, all that is left to do is run the package. Note: If you are not using the existing pubspec.yaml ensure that your config file is located in the same directory as it. flutter pub getįlutter pub run flutter_launcher_icons -f The name of the file when running the package. ![]() If you name your configuration file something other than flutter_launcher_icons.yaml or pubspec.yaml you will need to specify Min_sdk_android: 21 # android min sdk min:16, default 21 More complex examples can be found in the example projects. Setup the config file #Īdd your Flutter Launcher Icons configuration to your pubspec.yaml or create a new config file called flutter_launcher_icons.yaml.Īn example is shown below. Fully flexible, allowing you to choose what platform you wish to update the launcher icon for and if you want, the option to keep your old launcher icon in case you want to revert back sometime in the future. The Xcode images in this post were created with Xcode 7.A command-line tool which simplifies the task of updating your Flutter app's launcher icon. Check out this SO answer or the following documentation for help with this. This will conveniently resize for every size and orientation. I don't think the names matter as long as you get the dimensions right, but the general naming convention is as follows: Icon-29.png // 29x29 // 58x58 // 87x87 pixelsĪlthough you can use an image for the launch screen, consider using a launch screen storyboard file. Do a search for "ios app icon generator" or something similar. You can do it yourself or there are also websites and scripts for getting the right sizes. You can start with a 1024x1024 pixel image and then downsize it to the correct sizes. So, for example, in the first blank above (29pt 2x) you would need a 58x58 pixel image. For 2x double the points and 3x triple the points. If the image is 1x then the pixels are the same as the points. Look at how many points (pt) each blank on the empty image set is. However, even if I don't get this answer updated for future versions of iOS, you can still figure out the correct pixel sizes using the method below. The image at the very top tells the pixels sizes for for each point size that is required in iOS 9. png format) from Finder onto every blank in the app set. This will give you an empty app icon set. How to Set the App IconĬlick Assets.xcassets in the Project navigator and then choose AppIcon. Icon sizesĪbove image from Designing for iOS 9. Update: Unless you love resizing icons one by one, check out Schmoudi's answer. ![]()
0 Comments
Leave a Reply. |