Typically, before launching a new app, you will need to change the name of your Flutter application. While developing your application, the app will typically have a "dev" name, and you will most likely want to change this before submitting the app to Apple App store og Google Play.
Follow this step-by-step instruction to implement the necessarry changes.
1. Update pubspec.yaml
When making changes to pubspec.yaml, you should run the following command in the TERMINAL window to see the changes: flutter pub get
After you made changes to the "name" field in pubspec.yaml, you will most likely get a lot of errors in your Flutter project. This is due to the "package import" names now being wrong.
Do a "search-replace all" from the old name to new name as follows: from ":oldappname/" to ":myflutterapp/"
Remember to include the : and the / in the search-replace, as you otherwise may end up replacing unwanted items.
2. Change the "Title" attribute in the MaterialApp
This is typically located in the main.dart file. The "Title" attribute is shown in the above image.
3. Android specific changes
OBS! Do not change your applicationId after publishing. If you do, Google Play will see the new upload as a different app.
4. iOS specific changes
Access Info.plist again and add the information as shown in the below image:
And that should do the trick :)
André Vold
Her er en rask liten BLOGGER BIO for å fortelle litt om min bakgrunn - og hvorfor jeg valgte programmering som fagfelt.