Enhance Your Flutter Project: Effortless Renaming with the Flutter Rename CLI Tool

Published on by Flutter News Hub

Enhance Your Flutter Project: Effortless Renaming with the Flutter Rename CLI Tool

The Rename CLI Tool for Flutter empowers you to effortlessly modify your project's AppName and BundleId across various platforms, including iOS, Android, macOS, Linux, Web, and Windows.

Installation

To harness the power of this tool, simply execute:

flutter pub global activate rename

Usage

Navigate to your Flutter project directory and utilize the following commands:

Get AppName

rename getAppName --targets ios

Set AppName

rename setAppName --targets ios,android --value "YourAppName"

Get BundleId

rename getBundleId --targets android

Set BundleId

rename setBundleId --targets android --value "com.example.bundleId"

Parameters

  • Commands:
    • setAppName: Modify the App Name for specified targets.
    • setBundleId: Change the bundle identifiers for specified targets.
    • getAppName: Display app names for specified targets.
    • getBundleId: Display bundle identifiers for specified targets.
  • Options:
    • --targets: Specify target platforms (android, ios, web, windows, macos, linux).
    • --value: Set the value for the specified command (mandatory for setAppName and setBundleId).
    • --help: Display command instructions.

Troubleshooting

If the rename command fails to work directly in Windows, try these alternatives:

  • Using Flutter:
flutter pub run rename  [arguments]
  • Using Dart:
dart run rename  [arguments]

Conclusion

The Rename CLI Tool streamlines the renaming process in Flutter projects, saving you time and effort. Leverage its capabilities to efficiently customize your AppName and BundleId across multiple platforms.

Flutter News Hub