47
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Flutterにおけるアプリアイコンの変更

Posted at

Flutterにおけるアプリアイコンの変更方法

https://pub.dartlang.org/packages/flutter_launcher_icons
このライブラリを使うとぱぱっと変更できます。

pubspec.yml
dev_dependencies: 
  flutter_test:
    sdk: flutter
    
  flutter_launcher_icons: any

とりあえずFlutterプロジェクトのpubspec.ymlにflutter_launcher_iconsを追加します。
$ flutter packages get

それから、同じくpubspec.ymlにアイコンのパスと、それぞれのOSでアプリアイコン指定のものに変更するかを定義します。

pubspec.yml
flutter_icons:
  android: true 
  ios: true
  image_path: "assets/icon/icon.png"

アイコンを作り、指定したパスに配置し、最後の仕上げで以下のコマンドでアプリアイコンを生成します。
$ flutter pub pub run flutter_launcher_icons:main

まとめ

めっちゃ楽

47
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
47
21

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?