This question is answered here multiple times. But sometimes the fine details given in documentation are missed in hurry, so attempting to summarize it once again.
Google play store require every app to have new version number every time an update is uploaded. This is an INTEGER say 1 for your initial app (app bundle or APK) upload. Every time when you upload a new version, Google expect this version number to be bumped up. So, your next version should be greater than 1 meaning 2 or more. Do not get this version number confused with your flutter app version such as 1.0.3 or 1.1.1 or something like that. Every time when you upload a new version just increase play store specific version number (or rather upload count in simple). So, if you have just released an app, its initial version is 1, now when you release a new version with either a big feature update or a minor update, your next version should be 2 or more. So, if you kept it as 2, your next version should be 3 or 4. And if it was 4, then next should be 5 or more. Hope this gives an idea.
Now, the question here is, how you can simply manage this without the overhead of updating this in multiple places such as build.gradle file. As the official document says here, all you need to do is updating the version field in pubspec.yaml file.
version: 1.0.0+2
In the above version number, first three numbers separated by comma are app specific version. Your first version is 1.0.0, then next minor version is 1.0.1 and so on. The number comes after + is what does the trick here. When you build an android app using flutter run command, or by clicking the debug or run icon or run in profile mode/release mode etc. in VS Code or Android Studio, the local.properties file under android/app folder gets modified. For example, following is what created when I ran the android app in debug mode.
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=2
If you compare this with the version code 1.0.0+2, you can see what happened here. Everything before + sign is updated as versionName and the number after + got updated as versionCode. As long as your android/app/build.gradle file has following lines, all you need to do is to increase the version code after + sign every time you build an APK or app bundle for Play Store. So, in this case, when I would upload my next file in Play Store, I would use 1.0.0+3.
defaultConfig {
versionCode = flutter.versionCode
versionName = flutter.versionName
}
Needless to say, run your android app at least once in Android Studio or VS Code so that local.properties file has this latest version before app bundle or APK is created.