Davweb
Davweb

Reputation: 27

error with flutter flutter_launcher_icons

I'm trying to use the error with flutter flutter_launcher_icons plugin to change the launcher icons. Before I replaced the icons in the folder but this time I want to use this plugin made for that, but I get an error when I run:

flutter pub run flutter_launcher_icons:main

Here is the error:

    dependencies:
      flutter:
        sdk: flutter
    
    
      # The following adds the Cupertino Icons font to your application.
      # Use with the CupertinoIcons class for iOS style icons.
      cupertino_icons: ^1.0.2
      shared_preferences: ^2.0.12
      google_fonts: ^2.2.0
      flutter_screenutil: ^5.0.3
      animated_text_kit: ^4.2.1
      shake: ^2.0.0
      shake_event: ^0.0.9
      flutter_launcher_icons: ^0.9.2
    
    flutter_icons:
     image_path_android: "assets/icone-appi.png"
     image_path_ios: "assets/icone-appi.png"
     android: true
     ios: true  

I tried to modify the spaces in the writing, but nothing changes.

I thought it would be easier to set up, but I can't find the error.

Thank you for your help

Upvotes: 0

Views: 398

Answers (1)

fany fernaldi
fany fernaldi

Reputation: 397

1. Set up the config FIle

add your logo file (ex: logo.png) into assets folder, you have to create the folder first

add flutter_launcher_icons packages in your pubspec.yaml add a line like this to your package's pubspec.yaml

dev_dependencies:
  flutter_launcher_icons: ^0.9.2 
    
flutter_icons:
  android: true
  ios: true
  iamge_path: "assets/logo.png"

2. Run the package

After setting up the configuration, all that is left to do is run the package in the terminal.

flutter pub get
flutter pub run flutter_launcher_icons:main

Upvotes: 1

Related Questions