Code Monkey home page Code Monkey logo

Comments (8)

raamcosta avatar raamcosta commented on May 24, 2024

Is Data of a Navigation type?

https://composedestinations.rafaelcosta.xyz/destination-arguments/navigation-arguments

from compose-destinations.

Dalakoti07 avatar Dalakoti07 commented on May 24, 2024

Thanks @raamcosta for reply.

Yes, its annotated with kotlinx.serialization.Serializable like @Serializable

If use id:Int as required params for destination, then TypedDestination is created, and its taking int as params, but still not taking Serializable data object as param

from compose-destinations.

raamcosta avatar raamcosta commented on May 24, 2024

Thank you as well! ๐Ÿ™‚

Is Data class in the same module as the DetailsScreen composable?

from compose-destinations.

Dalakoti07 avatar Dalakoti07 commented on May 24, 2024

No, data class in in differenet module altogether

from compose-destinations.

raamcosta avatar raamcosta commented on May 24, 2024

In order for your navigation module to be able to serialize that data class, it needs to also use kotlinx serialization dependencies and plugins.

Hope that helps! Let' me know ๐Ÿ™‚

from compose-destinations.

ryanholden8 avatar ryanholden8 commented on May 24, 2024

Sorry I'm not sure I understand the solution in this thread.. In order for models annotated with @kotlinx.serialization.Serializable what must we do? We are already using the kotlinx.Serialization dependency. Is there something else we need to be using?

from compose-destinations.

raamcosta avatar raamcosta commented on May 24, 2024

I would go to kotlinx serialization GitHub page and check their setup. I donโ€™t know it from the top of my head, but I believe thereโ€™s also a gradle plugin you have to apply.

from compose-destinations.

paynd avatar paynd commented on May 24, 2024

This solution works for me. There was no implementation(libs.kotlinx.serialization) in module with navigation.

from compose-destinations.

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.