Is it possible changing the project name of a Flutter project? With project name I mean the name you provide when creating a flutter project flutter create name
.
Go to design center - Click on the API Spec you want to rename. It will open the raml file. In left hand side, under Files - the raml file name gets displayed. Move the cursor over the raml file name.
That depends on what you are trying to achieve. If you want to change the name of the app which is displayed in the mobile phones menu together with the app icon, you have to change the android:label
in the android/app/src/main/AndroidManifest.xml
(Code Sample 1) and the CFBundleName
in the ios/Runner/Info.plist
(Code Sample 2).
Last time I did this it took me ages to find out, why the name of the app was not changed in the list of currently running apps on Android. For that you also need to change the title of your MaterialApp (Code Sample 3).
For renaming it everywhere I would suggest to use search and replace in the project. If you do this, you have to choose a name without spaces or special characters. A project name 'new project' in the pubspec.yaml
for example will break the build.
Code Sample 1:
<application android:name="io.flutter.app.FlutterApplication" android:label="New Name" android:icon="@mipmap/ic_launcher">
Code Sample 2:
<key>CFBundleName</key> <string>New Name</string>
Code Sample 3:
return new MaterialApp( title: 'New Name' ...);
To add to Rainer's answer, you may also have to change the com.example.myprojectname file under android/app/build.gradle
Also for the com.example.myprojectname, do not use underscores (ie: com.example.my_project_name)
You may also have to find and replace the com.example.myproject name in the files project.pbxproj and MainActivity.java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With