I had an issue with Play Market telling me that version code of my app was 1, and that I need to increment it.

I found a maze of files from which version code is read, and finally after editing all of them didnt work, the way I found to solve it, was to edit the file android/app/build.gradle, and edit the following block:

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.myapp.appname"
        minSdkVersion 16
        targetSdkVersion 29
        multiDexEnabled true
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
and change flutterVersionCode.toInteger() to the version number I wanted.