GithubHelp home page GithubHelp logo

Comments (2)

xvrh avatar xvrh commented on July 26, 2024

It's not supported right now. But it's a good feature request.

There is several possibilities:

  • Convert the svg to a ui.Image at load time and reference the ui.Image from the composition. This probably could be done right now with the imageProviderFactory that returns a MemoryImage.
    The disadvantage of this technique is that you have to rasterize the image at a specific size ahead of time and you won't have the perfect pixel density.
  • Integrate the support for flutter_svg directly in this library. We will have a new dependency and every one will pay the cost in term of code size.
  • Add a customisable callback to paint the images. Anyone from outside of this library can link the image drawing code to any third party library.

from lottie-flutter.

appycamper avatar appycamper commented on July 26, 2024

Thanks, I'll try out your first suggestion. It'd be great if the library supported svg out of the box but I'm not sure how niche this use case is. In case it isn't a popular use case I'd suggest adding a customisable callback so I can use a third party library like flutter_svg.

from lottie-flutter.

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.