There is actually a really easy way to rename a project in Flutter. I stumbled upon this problem where my app was named com.example.myproject and I wanted to rename it to something like com.myapp.fileidea. If you create a new project, then it is easy, you can simply pass the parameter like this:
flutter create --org com.yourdomain appname
However, if you already created a project and need to rename the project, then you can simply add this package to your dev_dependencies in your pubspec.yaml file like this:
dev_dependencies: change_app_package_name: ^1.0.0
Then, after the pub get (which downloads your packages) you can type in the terminal:
flutter pub run change_app_package_name:main com.fileidea.appname
This command will run the package and rename all of the relevant files to “com.fileidea.appname”. More information here.
If you want to rename the app name in Flutter, in Android, you can check out the AndroidManifest.xml file and rename the value inside the property android:label to the desired name.