Comments (5)
When setting the navArgs in the destination annotation, the class is not the navigation argument, it’s just a class where navigation arguments are defined. So it doesn’t make sense for such a class to be a sealed type: you need a predefined set of arguments, you can’t tell the official nav lib “my arguments can either be these or these other”.
Im on the phone sorry for not formatting the reply, hopefully it’s understandable.
I’ve seen this confusion lately. Maybe I’ll enforce these classes to be named always SomehtingNavArgs to make it clear the args are its fields not itself.
from compose-destinations.
Another thing: the class passed to Destination annotation navArgs does not need to be itself Parcelable or any other valid navigation type, precisely because it will not be serialised. Instead its fields will.
from compose-destinations.
Related Issues (20)
- Removing from composition and re-adding when navigating HOT 3
- java.lang.IllegalStateException: Duplicate route found X_destination'. Routes must be unique!. In Muli-module project. HOT 2
- Missing classes detected while running R8 on AGP 8.4.0 HOT 2
- Video tutorials for using the library. HOT 1
- [KSP][2.1.0] _ModuleRegistry missing visibility modifiers HOT 4
- [DEEPLINK][2.1.0] Request to bring back withDeepLink() HOT 9
- Can compose-destinations used in compose for desktop project ? HOT 1
- Accompanist Navigation Material functionality now available in androidx.compose.material.navigation.* HOT 2
- "Reproducible build" possible with Compose Destinations? HOT 5
- popUpTo matches navArgs exactly HOT 4
- Multiple Backstacks HOT 1
- [Improvement] moduleName could be automatically raname to "main" HOT 1
- Multiple NavGraphs with shared routes on V2 HOT 1
- Sharing a view model between destinations but with a view model factory HOT 3
- Multiple DestinationsNavHost
- upgraded from 2.0.0-beta02 to 2.0.0-beta09 HOT 6
- Crash when using Parcelable class as navigation argument HOT 6
- [KSP] Destinations generation issue HOT 1
- Could not find Navigator with name "BottomSheetNavigator". You must call NavController.addNavigator() for each navigation type HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-destinations.