INTRODUCTION
This post will help you sort out the common things that you need to do to publish Flutter application. So, keep on reading...
How to set app icon in Flutter (Android) :
First of all, you need an app icon image, for that create or download an image you want to set as your app icon and then go to https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html to convert them to the required size. You'll need to put these icons in different 'minmap' folders present in the 'res' folder of your flutter project. Note : put the icons in their respective size folder i.e, hdpi, xhdpi...etc.
In your project explorer, go to 'android-->app-->src-->main-->androidmanifest.xml', In this file, there is an application tag, inside that tag you need to put this code.
android:icon="@mipmap/launcher_icon"
Replace the 'launcher_icon' with your image name. Now you can launch your app and it will have the icon image that you had set.
How to set the app name in Flutter (Android) :
In your project explorer, go to 'android-->app-->src-->main-->androidmanifest.xml', In this file, there is an application tag, inside that tag you need to put this code.
android:label="Your_app_name"
Replace the 'Your_app_name' with your app name and launch your application to see the name below the app icon as you have set in the above code.
How to set app title in Flutter (Android) :
App title is something which appears when you go into the multitask window. To set the app title, go to the first widget that you return in the main() function. And in the first MaterialApp widget set the app title as the code below :
MaterialApp(
title: 'Your_app_title',
Launch the application to see the change.
How to change the version code and version name :
When you first publish your app, the version name and version code of your app is by default set to '1.0.0' and '1' respectively. But, on further development, when you want to update your app you need to have a new version name and version code. To do so follow this simple step :
Go to 'pubspec.yaml' file, and find this line of code :
version: 1.0.0+1
Here, the number ahead of '+' symbol represents version name and the number after it represents version code.
So change that to :
version: 1.1.0+2
So, now you know, on updates after it just keep on increasing the digits.
No comments:
Post a Comment