搜索分类、插件与代码仓

插件详情v1.6.6

rename_app

具有声音空安全的 Flutter 包,可为所有平台更改应用名称!

AndroidiOSmacOSWindowsLinux
近 30 天下载
2.4万
喜欢数
361
Pub 分数
140

安装插件

flutter pub add rename_app

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,可简化在所有平台(Android、iOS、macOS、Windows 和 Linux)上更改应用名称的过程,完全支持声音空安全。它会自动更新各平台特定的配置文件,确保一致性并减少手动错误。非常适合需要快速重新品牌化或自定义应用显示名称而无需浏览复杂的原生项目结构的开发者。

适合场景

  • 重新品牌化现有应用
  • 按构建变体自定义应用名称
  • 简化多平台应用程序命名
  • 在CI/CD流水线中自动更新应用名称
  • 更新应用名称而不编辑原生文件

主要特点

  • 跨平台兼容性
  • 声音空安全支持
  • 自动配置更新
  • 简单的 CLI 集成
  • 保留现有应用结构

适合对象

  • Flutter 开发者管理多个应用变体
  • 需要一致应用命名的团队
  • 频繁更换品牌标识的项目
  • 使用自动化构建工作流的开发人员

使用建议

  • 更新后需要手动验证
  • 可能与自定义构建配置冲突
  • 不适用于具有高度自定义原生设置的应用程序
  • 仅限应用名称更改
  • 不处理图标重命名

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Stand With Palestine

Rename App

The only flutter package which changes app name for all platforms with sound null safety!

If you want to autmatically change your flutter app name with a single command then you are at the right pacakge. This package gives you too many flexibilities through too many variants of its commands. Read the details below to know in more details

  • ✊ Dont forget to star the github repo if you found this package useful 😇

Developer : Syed Waleed Shah ( LinkedIn Github StackOverflow )

Please Contribute : Github Repository

Honourable Contributors:

  1. Finn Drünert ( Github )
  2. nhan7777 ( Github )
  3. Harsh Yadav ( Github )

Features 🔥

✅ Rename Android Project

✅ Rename IOS Project

✅ Rename WEB Project

✅ Rename Windows Project

✅ Rename Linux Project

What rename_app does

rename_app is a command-line helper you run against a Flutter app project. From the project root (the folder where your app’s pubspec.yaml lives), it edits the platform files that expose the launcher / UI display name. For example: Android (AndroidManifest.xml label), iOS (Info.plist and variants when present), Web (manifest.json), Windows runner sources, and Linux application metadata.

It does not automatically change strings inside your Dart code (such as MaterialApp(title: …)): that stays up to you. For each platform, if the expected config file is missing or you pass an empty name for that platform, that platform is skipped and a short message may be logged.

Arguments like android="..." only update Android; omitting others leaves those platforms untouched. all="..." and config_name.name apply the same name across Android, iOS, Web, Windows, and Linux in one shot.

macOS renaming is currently not wired in the tool (mac CLI is listed for compatibility).

How To Rename ? 🛠

1) ADD THE PACKAGE TO YOUR pubspec.yaml

You only need the package to run dart run rename_app:main, so dev_dependency is typical for an app:

dart pub add rename_app --dev

Alternatively, add rename_app under dependencies: if your workflow prefers that.

2) PROVIDE THE APP NAME

Run commands from your Flutter project directory (pubspec.yaml must exist there). Names are arbitrary display strings — use quoting on the CLI when they contain spaces.

You can supply the app name in two complementary ways:

A — From pubspec.yaml (no CLI arguments)

Add a config_name block at the top level of pubspec.yaml (alongside name:, description:, etc.):

config_name:
  name: "My App"
  • name must be a string. If config_name.name is present, running with zero arguments:

    dart run rename_app:main
    

    is equivalent to dart run rename_app:main all="My App" — same name for Android, iOS, Web, Windows, and Linux.

  • pubspec.yaml must parse as YAML. If the block is missing, name is missing/wrong type, or reading the file fails, the tool prints the help message and exits (same as older versions without config_name).

  • CLI always wins: as soon as you pass any argument (for example all="..." or android="..."), config_name is not used for that invocation.

B — From the CLI (explicit arguments)

Same name for all supported platforms:

Same name for all apps
dart run rename_app:main all="My App Name"
Separate name for specified platform(s) and same for all others
dart run rename_app:main android="Android Name" ios="IOS Name" others="Others Name"
Separate name for each platform
dart run rename_app:main android="Android Name" ios="IOS Name" web="Web Name" mac="Mac Name" windows="Windows Name" linux="Linux Name"

More Flexibilities 😎

REQUIREMENT COMMAND
From pubspec Add config_name.name, then dart run rename_app:main (no arguments)
All Same dart run rename_app:main all="App Name"
Only Android dart run rename_app:main android="Android App"
Only IOS dart run rename_app:main ios="IOS App"
Only WEB dart run rename_app:main web="Web App"
ONLY Windows dart run rename_app:main windows="Windows App"
ONLY Linux dart run rename_app:main linux="Linux App"
With Others dart run rename_app:main android="Android App" ios="IOS App" others="Others App Name"

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目