OpenDocument
inline fun <ViewModel : BaseLifecycleViewModel> OpenDocument(types: List<String>, noinline onResult: ViewModel.(Uri?) -> Unit): ComposableNavSpec.Launcher<ViewModel, Array<String>, Uri?>
Creates a ComposableNavSpec.Launcher to open the file manager app to pick a file.
Parameters
ViewModel
the type of BaseLifecycleViewModel the result should be called on.
types
List of mime types allowed to be selected.
onResult
Callback method that returns an Uri of the file selected, or null
if nothing was selected.