flutter_logo_updater
Tool to update all app icons in flutter project
Installing:
pip install flutter_logo_updater
Using:
flutter_logo_updater logo_file_path project_file_path
Exmple:
caojianfeng$ flutter_logo_updater msks/images/logo_lxb.png msks
==================================================
PROJECT LOGO Updating...
In /Users/caojianfeng/Documents/w/msks
With /Users/caojianfeng/Documents/w/msks/images/logo_lxb.png
--------------------------------------------------
[01/20]->(48*48) /Users/caojianfeng/Documents/w/msks/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
[02/20]->(72*72) /Users/caojianfeng/Documents/w/msks/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
[03/20]->(96*96) /Users/caojianfeng/Documents/w/msks/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
[04/20]->(144*144) /Users/caojianfeng/Documents/w/msks/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
[05/20]->(192*192) /Users/caojianfeng/Documents/w/msks/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
[06/20]->(20*20) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
[07/20]->(29*29) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
[08/20]->(40*40) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
[09/20]->(40*40) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
[10/20]->(58*58) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
[11/20]->(60*60) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
[12/20]->(76*76) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
[13/20]->(80*80) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
[14/20]->(87*87) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
[15/20]->(120*120) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
[16/20]->(120*120) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
[17/20]->(152*152) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
[18/20]->(167*167) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
[19/20]->(180*180) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
[20/20]->(1024*1024) /Users/caojianfeng/Documents/w/msks/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
==================================================
How does it work:
1. Find a config
Find a config from your_flutter_project/flutter_logo_updater.json (TODO)
If no config found a default cfg while be use.
{
"ios": {
"appiconset": "ios/Runner/Assets.xcassets/AppIcon.appiconset"
},
"android": {
"manifest": "android/app/src/main/AndroidManifest.xml"
}
}
2. Find icon infos
To kown which png shoud be replaced.
2.1 On iOS
2.1.1 Find icons by the AppIcon.appiconset/Contents.json
2.1.2 Get the image_filename and size info from the json.
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"..."
}
]
}
2.2 On Android
2.2.1 Find the android:icon prop of manifest/application from AndroidManifest.xml
<manifest>
<application
android:icon="@mipmap/ic_launcher">
<!-- ... -->
</application>
</manifest>
2.2.2 Parse base_dir from android:icon
So flutter_logo_updater kown which dir to search, mipmap or drawble.
2.2.3 Search png files and read their size.
3. Resize you logo(1024*1024) to sizes of the icons and replace them.
4. TODO
- Find a config from your_flutter_project/flutter_logo_updater.json
- Cut down size of the icons by pngquant
Metadata
Release files for flutter-logo-updater 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flutter_logo_updater-0.0.4.tar.gz | 5.0 kB | Without provenance | Details for flutter_logo_updater-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flutter_logo_updater-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for flutter_logo_updater-0.0.4-py3-none-any.whl |
Total release size: 11.4 kB
Release files / flutter_logo_updater-0.0.4.tar.gz
| Download URL | flutter_logo_updater-0.0.4.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8225b951fb1ba2ed7383454f075dba7a717a52c073f7eaaf508396711c55143
|
|
BLAKE2b-256 checksum How to use checksums |
2da61059dadb660b013e2af76ff379dc679a929c21a7ed14491226cb8ff9b453
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.4
|
Release files / flutter_logo_updater-0.0.4-py3-none-any.whl
| Download URL | flutter_logo_updater-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25191eb0192e2bbe6c32659f8ecddae4516d891dbebf28d34167dd19a2f6face
|
|
BLAKE2b-256 checksum How to use checksums |
f2f38541c4c6b555f112c529bd69da12e60e532f02bde139c0d444e8c984fe78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.4
|
Security for flutter-logo-updater 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.