Git Product home page Git Product logo

Comments (6)

mcpiroman avatar mcpiroman commented on April 26, 2024 7

What about simple components like flowlayout which don't use any dependency on android? For now I have to copy paste the code into my compose-desktop project.

from accompanist.

chrisbanes avatar chrisbanes commented on April 26, 2024 1

Makes sense to me @colinrtwhite. Marking this as 'wontfix' for now.

from accompanist.

chrisbanes avatar chrisbanes commented on April 26, 2024

Likely not unfortunately. All of the image loading libraries we support have a dependency on Android.

I wonder if Coil could be refactored with a Kotlin only base lib? @colinrtwhite

The new insets support is very dependent on Android too.

from accompanist.

colinrtwhite avatar colinrtwhite commented on April 26, 2024

Hmm I wouldn't rule it out entirely, but it probably not. Off the top of my head here are some hurdles:

  • Okio and Coroutines are multiplatform, but OkHttp isn't. Not sure if they plan to support multiplatform, but if not we would have to add hooks to use other networking libraries (and maybe write our own disk cache).
  • Coil is very coupled with Bitmap. I'm not sure if BufferedImage or another Swing class supports everything we use.
  • Coil is very coupled with BitmapFactory. Coil's GIF, SVG, and video frame support all also depends on Java-only/Android libraries. Supporting all of Coil's functionality using Swing's APIs would be a lot of effort.
  • There's probably more as well...

from accompanist.

outadoc avatar outadoc commented on April 26, 2024

I'm experimenting with Compose Desktop, and thinking of using accompanist-insets in the common code. For a lib like this one, it could make sense to provide no-ops for platforms other than Android, e.g. a function like Modifier.navigationBarsPadding() provides 0.dp on desktop.

There might be issues I haven't considered but it would be very useful not to have to provide a multiplatform wrapper myself.

from accompanist.

mcpiroman avatar mcpiroman commented on April 26, 2024

Ok, I see there is #393

from accompanist.

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.