Skip to content

Commit

Permalink
feat: add Android adaptive icons with flutter_launcher_icons
Browse files Browse the repository at this point in the history
  • Loading branch information
rileychh committed Feb 17, 2024
1 parent f7bb3f4 commit ed05471
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 7 deletions.
Binary file added assets/images/android.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
17 changes: 17 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.5.0"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7
url: "https://pub.dev"
source: hosted
version: "0.4.0"
clipboard:
dependency: "direct main"
description:
Expand Down Expand Up @@ -654,6 +662,15 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.8.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
path: "."
ref: "006cb1ed53f969bf11816cde5b16dd520e1ee40e"
resolved-ref: "006cb1ed53f969bf11816cde5b16dd520e1ee40e"
url: "git@github.com:fluttercommunity/flutter_launcher_icons.git"
source: git
version: "0.13.1"
flutter_lints:
dependency: "direct dev"
description:
Expand Down
19 changes: 12 additions & 7 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
tat_core:
git:
url: git@github.com:NTUT-NPC/TAT-Core.git
ref: e5a9259946f1139fa61a784916192915831fe2c5 # restricted by dart language version. (<3)
ref: e5a9259946f1139fa61a784916192915831fe2c5 # added support for android 13+ themed icons

path: ^1.8.2 # restricted by flutter sdk.
path_provider: ^2.0.15
Expand Down Expand Up @@ -92,17 +92,17 @@ dependencies:
intl_utils: ^2.8.5
flutter_native_splash: ^2.2.19 # restricted by path 1.8.2


dependency_overrides:
intl: ^0.18.1

dev_dependencies:
flutter_test:
sdk: flutter

dependency_validator: ^3.2.3

# flutter_launcher_icons: ^0.11.0 Restricted by flutter_native_splash. Enable it if you want to use it.
flutter_launcher_icons:
git:
url: git@github.com:fluttercommunity/flutter_launcher_icons.git
ref: 006cb1ed53f969bf11816cde5b16dd520e1ee40e # feat: added support for android 13+ themed icons
build_runner: ^2.3.3 # restricted by dart language version. (<3)
json_serializable: ^6.6.2 # restricted by dart language version. (<3)
flutter_lints: ^2.0.3 # restricted by dart language version. (<3)
Expand All @@ -126,10 +126,15 @@ flutter_intl:
# Run "flutter pub run intl_translation:extract_to_arb --output-dir=lib/l10n lib/l10n/intl_messages.dart" to generate it.
enabled: false

flutter_icons:
flutter_launcher_icons:
image_path: assets/images/original.png

android: true
adaptive_icon_background: "#ffffff"
adaptive_icon_foreground: assets/images/android.png # Android 8.0+ icons
adaptive_icon_monochrome: assets/images/android.png # Android 13+ themed icons

ios: true
image_path: "assets/images/tat.png"

flutter_native_splash:
color: "#FFFFFF"
Expand Down

0 comments on commit ed05471

Please sign in to comment.