Giter Club home page Giter Club logo

Comments (6)

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

@gaara87 why are you looking to change the icon name?

Do you not want the icon to replace the existing launcher icon?

Or is it because you'd want to have seasonal icons and so anytime you run the tool with a new icon name, you want both apps to switch to the icon name specified but retain the old one?

from flutter_launcher_icons.

gaara87 avatar gaara87 commented on July 18, 2024

from flutter_launcher_icons.

franzsilva avatar franzsilva commented on July 18, 2024

Changing the file name would involve also modifying the underlying platforms iOS & Android so that it can point to the new filename. I would suggest having a folder with multiple icons and the types of icons you would like to have. then in the pubspec config we could read a parameter with the name of the icon and replace the icons needed.

So basically we could have a parameter in the pupspec file like

flutter_icons:
  image_path: "icon/icon.png" 
  android: true
  ios: false
  custom:
    icon1:  "icon/icon1.png"
    icon2:  "icon/icon2.png"
    icon3:  "icon/icon3.png"

Then we can add an optional parameter to specify the icon name to use like:

flutter pub pub run flutter_launcher_icons:main icon3

then we would use that icon specified on the command.

This would allow to quickly swap the icons.

What do you think?

from flutter_launcher_icons.

gaara87 avatar gaara87 commented on July 18, 2024

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on July 18, 2024

@gaara87 I've been working on trying to get something implementing for this, you can test it out and let me know if it's working similar to what you desire.

Currently, I've managed to get a couple of things working for the Android part of the Flutter project. Right now you can do the following for the Android part of the Flutter project:

  • Replace the existing launcher icon

overwrite = true

  • Create a new launcher icon and switch to using it whilst keeping the old one if you wish to go back to it
overwrite = true
ic_name = "ic_test"

Both of these settings need to be added to the pubspec.yaml file.

NOTE: This is only available on my forked repo for now (find here - https://github.com/MarkOSullivan94/flutter_launcher_icons ). So you will need to clone it and then use the clone version of the package instead of the one published.

flutter_launcher_icons:
  path: ../../flutter_launcher_icons/ # location of where you clone the forked package

from flutter_launcher_icons.

gaara87 avatar gaara87 commented on July 18, 2024

from flutter_launcher_icons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.