Comments (6)
yes this solution works but i want to know any safer and easier way is exist in Compose destination lib or not
thanks
from compose-destinations.
use navController.previousBackStackEntry?.savedStateHandle?.set(key,value) to pass data from Screen B and receive it in A with navController.currentBackStackEntry?.savedStateHandle?.getLiveData(key)
from compose-destinations.
Yeah at the moment there is no special help or support in the library to make this easier or safer.
So as @knightsamir said, that is your solution.
Maybe in the future I can explore something to make this also type safe. But that will be low priority enhancement.
I'm closing this issue. Let me know if this helped @amirzeinaly
from compose-destinations.
It was a totally valid and relevant question! 👍
As I said, maybe I can check something to improve it later. No promises for now though.
from compose-destinations.
New release has a new feature to make this easier and safer. Let me know if you like it 🙂
from compose-destinations.
Thank you you are wonderful
from compose-destinations.
Related Issues (20)
- [bug] /navtype/EnumCustomNavTypes.kt Conflicting import, imported name is ambiguous HOT 1
- Override dialog transitions HOT 1
- [Help needed] Question related to bottom sheet navigation as destination HOT 2
- Navigation Animations are laggy and with blank background(?) HOT 2
- Navigating back multiple screens with a result HOT 2
- Bottom sheet jumps during upward scroll 1.9.54 HOT 1
- Support for internal classes in navigation arguments HOT 1
- Back Stack Navigation is not working at all HOT 2
- Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option HOT 11
- Re-render of DestinationsNavHost from ViewModel value HOT 3
- java.lang.IllegalStateException: 'composable' can only be called for a destination of style 'Animated' or 'Default' HOT 2
- How do you use DestinationStyle.Animated::class in destination style on version 1.9.54 HOT 1
- Parcelable with generic type not generated into a nav argument
- The navigation animations are lagging on Android 14, tested it with the native NavHost, it doesn't lagg there HOT 2
- Could not find Navigator with name "BottomSheetNavigator". You must call NavController.addNavigator() for each navigation type HOT 2
- Passing ViewModel getting Error HOT 5
- Document OpenResultRecipient
- Support for sharing ResultBackNavigator between nested destinations HOT 2
- DestinationStyle.Dialog with usePlatformDefault properties causes wrong dialog measuring at some devices HOT 1
- Background is shown on exit transition HOT 2
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.