How to Publish Flutter App on Play Store

How to Publish Flutter App on Play Store

Build, Release and Deploy your Flutter application on PlayStore

ยท

6 min read

Introduction

  • Every Flutter application developer wishes to create a public app that will be downloaded by the people and used by many.
  • If you are one among them then you have come to the right place. Here, I am going to share with you the best and easy way to publish your flutter application on the Play store.
  • This step-by-step tutorial will take you through every step required to publish your flutter app on the play store.
  • Excited? ExcitedHockeyGIF.gif
  • Let's get started.

Step - 1: Add a Launcher Icon

  • After you've designed your Icon. Now it's time to add it to our project.
  • For that go to App Icon Generator.
  • Drop your Icon.
  • After that select Android and click on Generate button.
  • It will create a zip file containing all the different sizes of Icons that you require for publishing the application.
  • generateAppIcon.gif
  • Extract the zip file
  • afterextract.png
  • Here we got android(containing all the mip-map folders), playstore icon (will use this later when publishing), and appstore icon.
  • Now copy all the folder available in the android folder and replace it with android > app > src > res mip-map folders
  • replacingmipmap.gif
  • To check whether the icon has been set or not let's run the app.
  • appicongenerated.png
  • Okay, so we've successfully added Launcher Icon. Let's rename our app and also the bundle and appId.

Step - 2: Rename the App, BundleId, AppId

  • For renaming the app, Bundld and AppId we can use rename package available in Pub.dev.
  • For that first of all we have to activate the command. For that paste the below command in your terminal.
  • pub global activate rename
    
  • After activating the command, we can now rename the app by running the below command.
  • pub global run rename --appname "Counter"
    
  • Instead of Counter specify your own app name
  • You'll get this message after running this command.
  • appnamechanged.png
  • Now to rename the BundleId run the below command.
  • pub global run rename --bundleId com.dhruvnakum.counter
    
  • bundleIdchanged.png
  • Make sure your BundleId and AppId are unique.
  • Now let's run the app and check if the name has changed or not.
  • appnamechangedonphone.png

Step - 3: Signing the app

  • To publish on the Play Store, you need to give your app a digital signature. Use the following instructions to sign your app.
  • Create key.properties file inside the android folder.
  • keyfilecreated.png
  • Now paste the below text inside key.properties
  • storePassword=eChim2v6qKn3     '''use your password here and make sure to keep it in secret.'''
    keyPassword=eChim2v6qKn3
    keyAlias=upload
    storeFile=<location of the key store file, such as /Users/<user name>/upload-keystore.jks>
    
  • After this run the below command in your terminal.
  • For Windows

    keytool -genkey -v -keystore c:\Users\nakum\upload-keystore.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias upload
    

    For Mac / Linux

    keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
    
  • keyjksgenerated.gif
  • Go to the file location where key is generated.
  • localkey.png
  • Now move this upload-keystore.jsk inside android > app folder.
  • keymovedtoandroid.png
  • Update the storeFile path inside the key.properties file.
  • storePassword=eChim2v6qKn3
    keyPassword=eChim2v6qKn3
    keyAlias=upload
    storeFile=../app/upload-keystore.jks
    
  • Now go to [project] > android > app > build.gradle file and add the following text above the android { ... }
  • def keystoreProperties = new Properties()
    def keystorePropertiesFile = rootProject.file('key.properties')
    if (keystorePropertiesFile.exists()) {
      keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
    }
    
  • aboveandroid.png
  • Scroll down a little bit and remove buildType{ ... } and paste the below text instead.
  •   signingConfigs {
         release {
             keyAlias keystoreProperties['keyAlias']
             keyPassword keystoreProperties['keyPassword']
             storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
             storePassword keystoreProperties['storePassword']
         }
     }
     buildTypes {
         release {
             signingConfig signingConfigs.release
         }
     }
    
  • replacebuild.png

Step: 4 - Create android app bundle

  • Run futter clean to clean the previous build.
  • flutter clean
    
  • Now to generate appbundle run the below command.
  • flutter build appbundle
    
  • This will create a .aab inside build > app > output > bundle > app-release.aab.
  • aabgenerated.png

  • Now it's time to publish this app via Developer Console.


Step: 5 - Create Developer Account

  • Head over to Developer Account
  • You have to pay $25 to create a Developer account. If you have it already skip this step.
  • So create the account and then jump over to Step : 6

Step: 6 - Create App

  • Now click on the Create App button
  • createapp.png
  • Now Fill App Name, Default Language, App Type, Free or Paid and check all the checkbox.
  • createappcrated.png

Step: 7 - Adding Description, Logo, Screenshots, Videos, Feature Graphics.

  • Now go to Store presence > Main store listing.
  • mainstorepresence.png
  • Fill out the Short and Full description.
  • appdis.png
  • Now to add App Icon open the previously downloaded AppIcons file.
  • Here you will see a png file named playstore.
  • Simply drag and drop this playstore.png into App icon box.
  • icondrop.gif
  • Now you have to add Feature Graphics.
  • For that, I've found out a very good website Online Graphic Generator. You can create Feature Graphic using this website. Feel free to use any website.
  • feature_graphic.png
  • Now add at least 2 Screenshots of your app in the Phone Screenshots section.
  • ss.png
  • If you have 7' and 10' tablets Screenshot please add it also in the Tablet section.
  • tablet.png
  • Now Save the Main Store Listing.

Step: 8 - Store Setting

  • Now go to Store Settings and select your app Category and add tags if you want to.
  • category.png
  • Now enter your email (required), phone number, and *website URL.
  • email.png
  • Save it.

Step: 9 - Add Country and Region

  • Go to Production > Country / Region and then add the countries where you want to show your app.
  • country.gif

Step: 10 - App Content

  • Add Privacy policy of your app. You can use Privacy Policy Generator or if have any then paste the link in the text field.
  • privacy.png
  • Select App Access

  • appaccess.png
  • Go to Ads and select YES if your app contains ADS or NO if app doesn't contain any type of ADS

  • ads.png
  • Go to Content Rating. Select the category of your app.

  • contentrating1.png
  • Now go to Questionnairy tab and answer the given questions.
  • After answering all the questions Save it.
  • Now go to Target audience and content

  • Select What are the target age groups of your app?
  • targetage.png
  • Click Next
  • Select the appropriate options on the App Details page.
  • appdetails.png
  • Click Next 2 times. You'll end up in Store presence tab. Select appropriate option.
  • storepresence.png
  • Click Next and Save it.
  • Go to News apps

  • Select YES if your app is news app, otherwise select NO.
  • newsapp.png
  • ALL DONE.

Step: 11 - Rollout the Application in Production

  • Click on Production from the sidebar.
  • Create a New Release
  • newrelease.png
  • Now upload the app-release.abb app bundle file in App Bundle section.
  • bundleadded.gif
  • Now add Release Note this will be displayed on your Google Play's App's home page.
  • releasedetail.png
  • Save it and Review Release.
  • Now FINALLY click on Start Rollout To Production.
  • rollout.png
  • That's it ๐ŸŽ‰!! Now you have to wait for the response from the google team. They will review your application manually and then will add it to the Google Play Store.
  • SimonGoldenBuzzerGIF.gif

Wrapping Up

  • Thanks for reading. Hope you liked it.
  • Feedback and Comments are welcomed ๐Ÿ™‚

  • PeaceOutImOutGIF.gif

Did you find this article valuable?

Support Dhruv Nakum by becoming a sponsor. Any amount is appreciated!

ย