How to change launcher icon in flutter?

How to change launcher icon in flutter?

To change the launcher icon, open the ‘pubspec.yaml‘ file in your project. Under ‘dev_dependencies’ enter launcher icon package dependency as shown below. Click here to know the latest version of Launcher Icon.

  dev_dependencies:
      flutter_launcher_icons: "^0.7.0"

Now write as shown below starting with ‘flutter_icons’:

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

Once the whole code is written, run below written commands under terminal window:

  flutter packages get
  flutter packages pub run flutter_launcher_icons:main

 

* The Content stated above is for informational purpose only. Expert Software Team is not responsible if any part of content found meaningless in any manner or condition.

How to change package name in flutter?

How to change package name in flutter?

We will start by changing the Android App Name first:

  • Open this file ‘AndroidManifest.xml‘ in your project and enter required name in front of ‘android:label’:
<application android:name="io.flutter.app.FlutterApplication"
     android:label=“EnterAppNameHere” 

Now we change the Package Name:

  • In the same file ‘AndroidManifest.xml‘  inside below mentioned line enter package name after ‘package=’:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"  
     package="your.package.name" 

                                                                           

  • Now in ‘build.gradle‘ file enter package name after ‘applicationId‘:
defaultConfig { applicationId "your.package.name"
         }
  • Open this file now ‘MainActivity.java’ and on top you will find ‘package’ where you can enter package name as below:
             package your.package.name;
             import android.os.Bundle;
             import io.flutter.app.FlutterActivity;
  • Last Step is to change the Directory name under Android Folder:

          Before  

android\app\src\main\java\com\example\name

\com   –> \your

\example  –> \package

          After change

android\app\src\main\java\your\package\name

 

* The Content stated above is for informational purpose only. Expert Software Team is not responsible if any part of content found meaningless in any manner or condition.