Skip to main content

Setting up Android, iOS app icons using flutter_launcher_icons plug in

  


Setting up  Android, iOS app icons using flutter_launcher_icons plug in



  1. Go to pub.dev to find the flutter_launcger_icons plug in. 

                               


         2.  Add the dependency on pubspec.yaml
       
         flutter_launcher_icons: ^0.7.5 (version varies )
       
        If the App is in development stage you can add the dependency under dev_dependencies. 
         
                           

        and run pub get or packages get 
       
                               



        3.  Setup config file
       
     Within pubspec.yaml under dev_dependencies add the below flutter_icon config mentioning the path of the icon image file. Make sure the command alignment is correct as it is shown in the image below. 

flutter_icons:
  android: "launcher_icon"
  ios: true
  image_path: "assets/icon/icon.png"

                      

open the terminal in your IDE and run below command

flutter pub run flutter_launcher_icons:main

Also you don't have to run the flutter pub get (you have done it in the previous step )


You will see an output somewhat like this:
                        

Done !!


To Verify:

Android: - Go to res folder under android:


ios: - Go to AppIcon folder under iOS:


Comments

Popular posts from this blog

Flutter App’s Link to Google Map

                                                                               Flutter App’s Link to Google Map        Note: I suggest you run a flutter upgrade prior making below amendments     1)  Log in to Google Cloud Platform and create a project for the API Key. Follow the instructions and basic settings.    PS: Billing account won't charge you a penny, Also API key is per project, Save “Your API Key” on a notepad   2)   Now go to  DartPack    https://pub.dev/flutter/packages         Search for  google maps  flutter   3)   Add the dependencies of packages   pubspec.yaml  file to:     ...

Adding a splash screen on Android flutter app

Adding a splash screen on Android flutter app am using 1024 * 1024 dimension image, also remember don't use file names with symbols but underscore "_" Copy and paste the image on to all the mipmap folder under android                                    Next go to drawable and open launch_background.xml and uncomment image assets info  Update with splash image name and source,  see below:     Rerun the Build, close reopen app to see the splash screen !! I like to use my own style/color ( this is optional ). Go to the values folder and create an xml file , I call it colors.xml ( New file > filename.xml ) add the xml properties on newly created file, in our case colors.xml                 <?xml version="1.0" encoding="utf-8" ?>  and the style and color of your choice. ...

Cannot fit requested classes in a single dex file

            Error: Cannot fit requested classes in a single dex file  Scenario:  Building project with cloud_firestore  Error: Fix: Go to app level build.gradle  and append minSdkVersion from 16 to 21, see below: now rerun the build!