0.3.0 • Published 6 months ago

update-flutter-app-icon v0.3.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
6 months ago

update-flutter-app-icon

CLI to update flutter project app icons (Android, iOS, Web, macOS).

Prerequisites

  • Make sure node 14+ is installed in your system.
  • Your app icon should be at least 1024 x 1024.

Usage:

Create a config file

Create a JSON file, for example, updateIcons.json in your flutter project, and you have different logo files for each platform within a folder named ./design/:

{
  "project": "./", // Flutter project dir relative to this config file.
  // ⬇️ PNG files for each platform.
  "windows": "design/windows.png",
  "macos": "design/macos.png",
  "ios": "design/mobile.png",
  "android": "design/mobile.png"
}

Update icons via CLI

  Usage
    $ npx update-flutter-app-icon <config_file>

  Options
    --dry-run  Show the results but don't update any files.

  Examples
    $ npx update-flutter-app-icon ./flutter_proj/updateIcons.json

Raw actions

If you want to create new icons instead of replacing old ones, use raw actions. For example, I want to create a 512x512 copy in asset folder for app about dialog:

{
  "project": "./", // Flutter project dir relative to this config file.
  // ⬇️ PNG files for each platform.
  "windows": "design/windows.png",
  "macos": "design/macos.png",
  "ios": "design/mobile.png",
  "android": "design/mobile.png",
  // Raw actions.
  "raw": [
    {
      "icon": "macos.png", // Source icon file.
      "out": "res/about_logo_512.png", // Dest path.
      "size": 512 // New size.
    }
  ]
}

Known issues

  • Maskable icons for web are not supported. You can replace maskable icons in web/icons via raw actions mentioned above.
0.3.0

6 months ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago