flutter_rebrand_kit 1.1.0
flutter_rebrand_kit: ^1.1.0 copied to clipboard
An all-in-one CLI tool to rebrand Flutter apps, update package IDs, generate launcher & notification icons, native splash screens, and Play Store graphics.
Flutter Rebrand Kit #
An all-in-one developer CLI tool to rebrand Flutter applications in seconds. Update app names, package identifiers, bump versions, generate adaptive launcher icons, convert notification silhouettes, wire native splash screens, and export Google Play Store marketing assets using a single command.
β‘ Standalone Native Engine #
Flutter Rebrand Kit is engineered from the ground up as an independent, pure Dart tool. It operates entirely on its own and does not run, wrap, or invoke other third-party packages under the hood:
- True Standalone Execution: Directly manipulates native manifests, build scripts, and asset trees without spawning external package sub-processes.
- In-Memory Image Pipeline: Loads and decodes master artwork into memory once, processing all target resolutions and densities in a single, high-speed execution.
- Clean Workspace: Never injects temporary dependencies or scripts into your project, keeping your
pubspec.lockand environment clean.
π What This Tool Does #
- β App Name: Updates application titles across Android, iOS, macOS, Web, Windows, and Linux.
- β Package ID: Updates bundle identifiers across Gradle, Xcode, and CMake build targets.
- β Source Code Migration: Physically relocates Kotlin/Java folder trees and updates package and import lines.
- β Launcher Icons: Generates Android adaptive/legacy icons and the full 20-asset iOS catalog.
- β Themed Icons: Generates Android 13+ Material You monochrome silhouettes.
- β Notification Icons: Generates anti-aliased white silhouettes with full-canvas fidelity and custom naming.
- β Native Splash Screen: Wires Android 12+ Splash API, Android legacy drawables, and iOS Storyboards.
- β Store Marketing Assets: Exports a 512Γ512 Google Play icon and a 1024Γ500 feature graphic banner.
β‘ Platform Support Matrix #
| Feature | Android | iOS | macOS | Web | Windows | Linux |
|---|---|---|---|---|---|---|
| App Name | β | β | β | β | β | β |
| Package / Bundle ID | β (Tree Migration) | β | β | N/A | β (Binary Name) | β (App ID) |
| Version & Build | β | β | β | β | β | β |
| Launcher Icons | β (Adaptive + Themed) | β (20 Sizes) | β³ v1.2 | β³ v1.2 | β³ v1.2 | β³ v1.2 |
| Notification Icons | β (Custom Name + Silhouettes) | N/A | N/A | N/A | N/A | N/A |
| Native Splash Screen | β (API 31+ & Legacy) | β (Storyboard Asset) | N/A | β³ v1.3 | N/A | N/A |
| Play Store Marketing Kit | β (512px & Banner) | N/A | N/A | N/A | N/A | N/A |
π οΈ Addressed Edge Cases & Platform Enhancements #
Standard standalone packages often miss critical platform requirements or contain known limitations. Flutter Rebrand Kit directly addresses and resolves these gaps:
- Full-Tree Source Code Relocation (Addressed from
rename):
Traditional renaming tools only update strings in Gradle and Manifest files, leaving Kotlin/Java source files stranded in the old directory path. This tool physically migrates the entire source tree, updates package headers, rewires internal imports across sub-packages, and prunes orphaned directories. - Engine File Protection:
Custom renaming scripts frequently relocate internal engine files likeGeneratedPluginRegistrant.java, resulting in broken Android builds. This engine explicitly identifies, isolates, and preserves allio.flutterfiles. - Full iOS Asset Coverage (Addressed from
flutter_launcher_icons):
Standard icon generators frequently omit 4 legacy asset slots (20@1x,29@1x,40@1x, and76@1x), which causes default Flutter icons to appear in iPad spotlight and the iOS App Switcher. This tool generates the complete 20-asset catalog alongside modern universal slots. - Desktop Executable Metadata (Addressed from
rename):
Existing tools update window titles but miss native binary metadata. This tool updates WindowsRunner.rc(FileDescription,ProductName,InternalName) and Linux GTK HeaderBar titles alongside primary window titles. - High-Fidelity Notification Engine (Addressed from
android_notification_icons):
Prevents stroke loss on delicate line art by rendering to full canvas dimensions (24to96px), preserving anti-aliased subpixels, and supporting custom drawable names (notification_icon_name) while auto-cleaning stale assets. - XML Entity & UTF-8 Encoding Safety:
Raw characters like&break Android XML compilation, and Windows system code pages often corrupt accented titles (e.g.,Γ€,ΓΆ,ΓΌ). The engine enforces UTF-8 across all operations and automatically escapes XML entities (&) forAndroidManifest.xml. - iOS Extension & Test Target Isolation:
Standard search-and-replace scripts overwrite all bundle IDs inproject.pbxproj, breaking code signing for App Extensions andRunnerTests. This tool identifies extension targets and preserves their distinct sub-identifiers.
π Master Image Guidelines #
Recommendation: Supply a 1024Γ1024 PNG with a TRANSPARENT background.
- Adaptive Icons & Splash: The tool centers the transparent logo within safe boundaries over your configured background color (
launcher_icon_bg_colororsplash_color), preventing Android 12+ circular crop clipping. - Notification Silhouettes: The alpha channel is used to generate white vector-style silhouettes (
#FFFFFF) for Android status bars. - Store Guidelines: Google Play and Apple App Store require opaque app icons. The tool automatically composites transparent assets onto solid canvases to ensure store compliance.
π Installation #
Add flutter_rebrand_kit to your dev_dependencies:
flutter pub add -d flutter_rebrand_kit
βοΈ Configuration #
Choose one of the two configuration styles below. All fields are optional.
Option A: Standalone File (Recommended) #
Create rebrand_kit.yaml in your project root:
# ==============================================================================
# FLUTTER REBRAND KIT CONFIGURATION (rebrand_kit.yaml)
# ==============================================================================
# 1. Identity (Android, iOS, macOS, Web, Windows, Linux)
app_name: "My Awesome App"
package_id: "com.company.awesomeapp"
version: "1.2.0+15"
# 2. Launcher Icons (1024x1024 Transparent PNG recommended)
launcher_icon: "assets/branding/app_logo_1024.png"
launcher_icon_bg_color: "#FFFFFF"
# Optional: Use an image background instead of a solid color
# launcher_icon_bg_image: "assets/branding/adaptive_bg.png"
# Optional: Custom monochrome silhouette for Android 13+ (auto-derived if omitted)
# launcher_icon_monochrome: "assets/branding/custom_mono.png"
# 3. Android Notification Silhouette
notification_icon: "assets/branding/app_logo_1024.png"
notification_icon_name: "ic_stat_notification" # Optional (defaults to "ic_notification")
# 4. Native Splash Screen
splash_image: "assets/branding/app_logo_1024.png"
splash_color: "#1E1E2E"
# 5. Play Store Marketing Assets
play_store:
generate: true
background_color: "#1E1E2E"
tagline: "Build better and ship faster"
Option B: Embedded in pubspec.yaml #
Add the rebrand_kit: block at the bottom of your pubspec.yaml:
dev_dependencies:
flutter_test:
sdk: flutter
flutter_rebrand_kit: ^1.1.0
rebrand_kit:
app_name: "My Awesome App"
package_id: "com.company.awesomeapp"
version: "1.2.0+15"
launcher_icon: "assets/branding/app_logo_1024.png"
launcher_icon_bg_color: "#FFFFFF"
notification_icon: "assets/branding/app_logo_1024.png"
notification_icon_name: "ic_stat_notification"
splash_image: "assets/branding/app_logo_1024.png"
splash_color: "#1E1E2E"
play_store:
generate: true
background_color: "#1E1E2E"
tagline: "Build better and ship faster"
π¨ Execution #
Run the CLI command from your terminal:
dart run flutter_rebrand_kit:rebrand_kit
Configuration Priority: #
rebrand_kit.yaml: Checked first. If present, it will be used.pubspec.yaml: Used ifrebrand_kit.yamlis not found.
π Configuration Reference #
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
app_name |
String |
No | null |
Display name across Android, iOS, macOS, Web, Windows, and Linux. |
package_id |
String |
No | null |
Application/Bundle ID. Updates build files and migrates Kotlin/Java folders. |
version |
String |
No | null |
Version and build number in pubspec.yaml (x.y.z+build). |
launcher_icon |
String |
No | null |
Master logo (1024Γ1024 transparent PNG). Exports Android mipmaps & 20 iOS sizes. |
launcher_icon_bg_color |
String (Hex) |
No | "#FFFFFF" |
Background color for Android adaptive icons and fallback canvases. |
launcher_icon_bg_image |
String |
No | null |
Background image for Android adaptive icons (overrides launcher_icon_bg_color). |
launcher_icon_monochrome |
String |
No | null |
Custom silhouette for Android 13+ theming (auto-generated from logo if omitted). |
notification_icon |
String |
No | null |
Source logo. Auto-converts to an anti-aliased white silhouette (drawable-*). |
notification_icon_name |
String |
No | "ic_notification" |
Custom output filename for Android notification drawables. Auto-cleans stale defaults. |
splash_image |
String |
No | null |
Splash logo. Padded to safe boundaries to prevent circular crop issues. |
splash_color |
String (Hex) |
No | "#FFFFFF" |
Background color for native splash screens on Android and iOS. |
play_store.generate |
bool |
No | false |
Enables generating assets in branding_assets/play_store/. |
play_store.background_color |
String (Hex) |
No | "#1E1E2E" |
Canvas color for the 512Γ512 store icon and 1024Γ500 feature graphic. |
play_store.tagline |
String |
No | null |
Subtitle printed on the 1024Γ500 feature graphic banner. |
π Generated File Destinations #
| Asset | Output Location |
|---|---|
| Android Legacy Icons | android/app/src/main/res/mipmap-*/ic_launcher.png |
| Android Adaptive Icons | android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml |
| Android 13+ Themed Icons | android/app/src/main/res/mipmap-*/ic_launcher_monochrome.png |
| iOS App Icons | ios/Runner/Assets.xcassets/AppIcon.appiconset/ (20 sizes + Contents.json) |
| Android Notification Icons | android/app/src/main/res/drawable-*/<icon_name>.png |
| Android Splash (<12) | android/app/src/main/res/drawable/launch_background.xml |
| Android Splash (12+) | android/app/src/main/res/values-v31/styles.xml |
| iOS Launch Screen | ios/Runner/Assets.xcassets/LaunchImage.imageset/ |
| Play Store Icon (512Γ512) | branding_assets/play_store/play_store_512.png |
| Feature Banner (1024Γ500) | branding_assets/play_store/feature_graphic_1024x500.png |
π License #
This project is licensed under the MIT License - see the LICENSE file for details.