OpenDocumentTree

inline fun <ViewModel : BaseLifecycleViewModel> OpenDocumentTree(startingLocation: Uri? = null, noinline onResult: ViewModel.(Uri?) -> Unit): ComposableNavSpec.Launcher<ViewModel, Uri?, Uri?>

Creates a ComposableNavSpec.Launcher to open the file manager app to pick a folder.

Parameters

ViewModel

the type of BaseLifecycleViewModel the result should be called on.

startingLocation

Optional Uri of the folder to start in.

onResult

Callback method that returns an Uri of the folder selected, or null if nothing was selected.