Giter Site home page Giter Site logo

Svg about flutter_launcher_icons HOT 17 OPEN

fluttercommunity avatar fluttercommunity commented on August 15, 2024 33
Svg

from flutter_launcher_icons.

Comments (17)

Nioux avatar Nioux commented on August 15, 2024 14

We are interrested to use it in our project too, but svg support is a requirement right now. Is there a planned date for this feature ?

from flutter_launcher_icons.

HannesGitH avatar HannesGitH commented on August 15, 2024 3

If you are on unix simply use convert logo.svg logo.png and you have a valid png to use for this package. I make a bash script which just converts svg to png, then calls this package.

problem is that then the icons would still be png in the final package which is not desirable, the android_vector xml assets would be much better

from flutter_launcher_icons.

connectety avatar connectety commented on August 15, 2024 2

I took a sharp look at implmenting SVGs.
The problem is rendering/converting the SVG to PNG.
I was not able to find a library with working SVG which does not depend on flutter.

I believe that, if it depends on flutter it must be run with the flutter command like an Flutter-app.
I would be pleased if someone tells me I am incorrect and what library to use / how to run a CLI-app which depends on dart:ui (flutter exclusive I think).

Probably correct ways to do this:

  • a fork of flutter_svg, which does not have any dependencies on flutter.
  • a standalone library just for this

Workarounds:

  • using flutter_svg and running the converting stuff via flutter test, which again gets called via console
  • running some non dart code via console, which can convert to PNG

from flutter_launcher_icons.

connectety avatar connectety commented on August 15, 2024 2

I somewhat implemented SVG support using inkscape. (meaning you have to install inkscape to use it)

Before merging the changes I want to: - add SVG support for adaptive icons - support custom Inkscape install paths - look into android vector image support for android - test MacOS support (I do not have a Mac for that :( and would require the help of someone who does) - get feedback on what to improve

If you want to help / take a look at it check out my branch:
https://github.com/connectety/flutter_launcher_icons/tree/svg

I have deleted the branch in favor of the official SVG branch (WIP use on your own risk!)
https://github.com/fluttercommunity/flutter_launcher_icons/tree/svg

dev_dependencies: 
  flutter_launcher_icons:
    git:
      url: git://github.com/fluttercommunity/flutter_launcher_icons.git
      ref: svg

from flutter_launcher_icons.

MarkOSullivan94 avatar MarkOSullivan94 commented on August 15, 2024 2

@connectety it's work in progress right now, wouldn't recommend anyone to use it until it's merged into master branch

from flutter_launcher_icons.

 avatar commented on August 15, 2024 1

Here it is:

flutter/engine#5060

example

[if(feature='Flutter.Image.encodeImage')]
enum EncodedImageFormat {
  [if(feature='Flutter.Image.encodeImage.jpeg')]
  JPEG,
  [if(feature='Flutter.Image.encodeImage.png')]
  PNG,
  [if(feature='Flutter.Image.encodeImage.webp')]
  WEBP,
}

class Image ... {
  [if(feature='Flutter.Image.toByteData')]
  Future<ByteData> toByteData({EncodingFormat format: const EncodingFormat.jpeg()}) { ... }
  
  [if(feature='Flutter.Image.encodeImage')]
  void encodeImage(EncodedImageFormat format, int quality, ImageEncoderCallback callback) { ... }
}

also checkout
https://github.com/dnfield/flutter_path_drawing

from flutter_launcher_icons.

NatoBoram avatar NatoBoram commented on August 15, 2024 1

I tried to use this package, but turns out it doesn't support SVG.

Android minSdkVersion = 16
Creating default icons Android
Overwriting the default Android launcher icon with a new icon
NoSuchMethodError: The getter 'width' was called on null.
Receiver: null
Tried calling: width
pub finished with exit code 2

Ping me when SVG is supported :)

from flutter_launcher_icons.

franzsilva avatar franzsilva commented on August 15, 2024

hi @gedw99 , Yes it is possible we will look into this and get back to you.

from flutter_launcher_icons.

mqus avatar mqus commented on August 15, 2024

I also would really like this feature.
Is there any progress? Is there anything we can do to help?

from flutter_launcher_icons.

PolymathWhiz avatar PolymathWhiz commented on August 15, 2024

I would really like this feature merged

from flutter_launcher_icons.

masseelch avatar masseelch commented on August 15, 2024

If you are on unix simply use convert logo.svg logo.png and you have a valid png to use for this package. I make a bash script which just converts svg to png, then calls this package.

from flutter_launcher_icons.

Qubitza avatar Qubitza commented on August 15, 2024

I would really like this feature merged, too

from flutter_launcher_icons.

nohkumado avatar nohkumado commented on August 15, 2024

same here, all my artwork for my projects is done in svg....

from flutter_launcher_icons.

bradintheusa avatar bradintheusa commented on August 15, 2024

Dart's svg support is not great. Are you able to load them ok?

from flutter_launcher_icons.

Sun3 avatar Sun3 commented on August 15, 2024

Any updates on support svg?

Thanks

from flutter_launcher_icons.

aastrouski avatar aastrouski commented on August 15, 2024

Any updates?

from flutter_launcher_icons.

HannesGitH avatar HannesGitH commented on August 15, 2024

I don't think so, but I might be able to find some time for this the coming weeks, I'll open a PR and let you know then (in case it's a relatively easy fix)

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.