koin icon indicating copy to clipboard operation
koin copied to clipboard

Add route support to koinNavGraphViewModel() extension

Open SebastianHelzer opened this issue 11 months ago • 1 comments

Is your feature request related to a problem? Please describe. The koinNavGraphViewModel() extension is perfect for scoping ViewModels to nav graphs but when using the nav graph DSL graph ids are inaccessible.

Describe the solution you'd like It would be nice if the extension function also supports routes. This issue was reported earlier as https://github.com/InsertKoinIO/koin/issues/1476 and addressed in this PR https://github.com/InsertKoinIO/koin/pull/1473 but the issue and PR were closed without being merged in.

Describe alternatives you've considered Currently I use my own variant of the extension function which does support route based navigation. It would however be better if I could just use the koinNavGraphViewModel() extension function.

Target Koin project koin-androidx-navigation

SebastianHelzer avatar Mar 11 '24 21:03 SebastianHelzer