To release the build, follow the steps given below.
If you have an existing Keystore, skip to the next step. If not, create one by running the following at the command line:
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
Generating the android release (APK or app bundle)
$ flutter build apk --release
$ flutter build appbundle --target-platform android-arm,android-arm64,android-x64
$ flutter build ios --release