flutter_name_manager 1.0.1 copy "flutter_name_manager: ^1.0.1" to clipboard
flutter_name_manager: ^1.0.1 copied to clipboard

A flutter package for changing your applications name across multiple platforms with a single command.

Flutter Name Manager #

A Dart dev tool that renames your Flutter app across all platforms from a single command. No manual editing of AndroidManifest.xml, Info.plist, .xcconfig, CMakeLists.txt or manifest.json required.


Found this useful? I accept coffee as thanks :)

Buy Me a Coffee at ko-fi.com #

Supported platforms #

Platform Files modified
Android android/app/src/main/AndroidManifest.xml
iOS ios/Runner/Info.plist
macOS macos/Runner/Configs/AppInfo.xcconfig, macos/Runner/Info.plist
Windows windows/CMakeLists.txt, windows/runner/Runner.rc
Linux linux/CMakeLists.txt, linux/my_application.cc
Web web/index.html, web/manifest.json

Installation #

Add to your Flutter project's pubspec.yaml as a dev dependency:

dev_dependencies:
  flutter_name_manager: ^1.0.0

Then fetch it:

flutter pub get

Usage #

Rename on all platforms #

dart run flutter_name_manager:rename_app --name "My Awesome App"

Rename on specific platforms only #

Pass a comma-separated list (or repeat the flag):

dart run flutter_name_manager:rename_app --name "My App" --platforms android,ios

dart run flutter_name_manager:rename_app --name "My App" -p android -p web

Dry run — preview without writing #

dart run flutter_name_manager:rename_app --name "My App" --dry-run

The dry-run output shows every file that would be touched and whether it currently exists in the project.

Run from a different directory #

dart run flutter_name_manager:rename_app --name "My App" --project-root /path/to/my/flutter/project

All options #

Flag Short Description
--name -n Required. The new app name.
--platforms -p Comma-separated list of platforms to update. Omit to target all.
--project-root -r Path to the project root. Defaults to $PWD.
--dry-run -d Preview changes without writing any files.
--help -h Show usage information.

Valid platform values: android, ios, macos, windows, linux, web.


After renaming #

A clean rebuild is required on each platform after renaming:

# Android / iOS / macOS / Web
flutter clean && flutter build <platform>

# Windows / Linux (CMake project name changes require a clean)
flutter clean && flutter build <platform>

On iOS and macOS you may also need to update the bundle display name in Xcode if it was previously hardcoded in a localisation file (InfoPlist.strings).


Programmatic API #

You can use the library directly in your own Dart scripts:

import 'package:flutter_name_manager/flutter_name_manager.dart';
import 'dart:io';

Future<void> main() async
{
  final results = await AppRenamer.rename(
    'My App',
    platforms: ['android', 'ios'],
    projectRoot: Directory('/path/to/project'),
  );

  for (final r in results)
  {
    print(r);
  }
}

Contributing #

Pull requests are welcome. Each platform renamer lives in lib/src/platforms/ and extends PlatformRenamer. Adding a new platform is as simple as:

  1. Create lib/src/platforms/myplatform_renamer.dart extending PlatformRenamer.
  2. Register it in the _renamers map in lib/src/renamer.dart.
  3. Add it to kSupportedPlatforms.
  4. Add tests in test/renamer_test.dart.

Licence #

MIT

1
likes
150
points
124
downloads

Documentation

API reference

Publisher

verified publishercode-prem.dev

Weekly Downloads

A flutter package for changing your applications name across multiple platforms with a single command.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

args, flutter, test

More

Packages that depend on flutter_name_manager