Last updated:
0 purchases
mx app icon
Language: English | 中文
mx_app_icon #
App icon generator.
Usage #
1. Use this package as a library
add mx_app_icon to dependencies
dev_dependencies:
mx_app_icon: any
copied to clipboard
import 'package:mx_app_icon/mx_app_icon.dart';
void main(List<String> args) {
final generator = MxAppIconGenerator();
final iconFile = File('圖片路徑');
final iosDir = Directory('./ios/Runner/Assets.xcassets/AppIcon.appiconset');
final androidDir = Directory('./android/app/src/main/res');
// 產生ios圖片
generator.generateIosIcon(iconFile.readAsBytesSync(), iosDir);
// 產生android圖片
generator.generateAndroidIcon(iconFile.readAsBytesSync(), androidDir);
}
copied to clipboard
2. Use this package as an executable
Activating a package
dart pub global activate mx_app_icon
copied to clipboard
Running
mx_app_icon -f {imagePath} -p ios -t {targetDir} -b #FFFFFF
copied to clipboard
Command Line Arguments
-f, --file image source file
-t, --target_dir target folder points to 'AppIcon.appiconset' for iOS and 'res' for Android.
-p, --platform platform (ios/android)
-b, --background background color
-h, --[no-]help description
copied to clipboard
(If thrown error command not found on step2, check this add path to env)
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.