Setup Before Deploy Your Flutter App to the Google Play Store

Jerry PM
3 min readOct 5, 2023

--

Using Google Play console

https://play.google.com/store/apps/details?id=com.google.android.apps.playconsole&hl=id

Before you build an app bundle (.aab) you must have this setting in your app after that, you can build an app bundle.

1. Change Your App Icon

Your app’s icon is often the first thing users see, so it’s important to make a good impression. To change the app icon in your Flutter project, you can use the flutter_launcher_icons package. This package allows you to easily generate app icons for various screen sizes and resolutions, ensuring your app looks great on all devices.

Link to flutter_launcher_icons package

2. Add a Splash Screen

A well-designed splash screen can enhance your app’s user experience by providing a professional and visually appealing introduction. Adding a splash screen to your Flutter app is relatively straightforward. You can create a custom splash screen by defining it in your project’s code, or you can use packages like flutter_native_splash to simplify the process.

Link to flutter_native_splash package

3. Create an Upload Keystore

To publish your app on the Google Play Store, you need to sign your app bundle with a keystore. A keystore is a secure container for storing cryptographic keys, including the private key required for signing your app. Make sure you have a keystore file ready before you proceed. You can create a keystore using tools like keytool or Android Studio.

Learn more about creating a keystore

https://docs.flutter.dev/deployment/android

// Use this in terminal to create keystore
keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

// example:
keytool -genkey -v -keystore /Users/jpm/Documents/Flutter/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload

// after that you can fill the form

4. Create “key.properties” File

In your Flutter project, you’ll need a “key.properties” file that contains the information required for signing your app bundle. This file typically includes details such as the keystore location, keystore password, key alias, and key password. Here’s an example of what your “key.properties” file might look like:

storeFile=<keystore-location>
storePassword=<keystore-password>
keyAlias=<key-alias>
keyPassword=<key-password>

Make sure to store this file securely and never commit it to version control systems to protect your app’s signing credentials

5. Configure signingConfig

Finally, you need to configure the signingConfig in your app’s build.gradle file. The signingConfig specifies the signing details for your app bundle. You can refer to the official Flutter documentation for a step-by-step guide on how to set up signingConfig for your Android app bundle.

Official Flutter documentation on signingConfig

6. Build app (.aab) file

By following these essential steps, you’ll be well-prepared to create an Android App Bundle (.aab) for your Flutter app. Once you’ve completed these preparations, you can use Flutter’s build commands to generate the .aab file and start the journey of distributing your app on the Google Play Store with all the benefits that app bundles offer in terms of size optimization and user experience. now you can build (.aab) file.

flutter build appbundle --release

// In my case I use this

flutter build appbundle --release --target=lib/app/main.dart

7. Term & Condition

Before you can successfully publish and distribute your Flutter app on the Google Play Store, you’ll need to adhere to the platform’s terms and conditions. Google Play Store has a set of guidelines and policies that developers must follow to ensure the quality, security, and user-friendliness of the apps available on their platform.

8. Publish App to Play Store

https://www.youtube.com/watch?v=g0GNuoCOtaQ

Note: UPDATE Version

If you want to update the version in Flutter App, You don’t need to modify manually your build.gradle. Open your pubspec.yaml and you will find an entry like this:

version: 1.0.0+1

Flutter uses semantic versioning so what do you need is to modify that entry:

version: 1.0.1+2

In this case, the version name will be 1.0.1 and the version code will be 2

.

--

--