CharSequenceNavHostResultOrNullHandler

Creates a NavHostResultHandler of CharSequence or null Requires that the Route.Result.Data.bundle is described by a SingleValueNavigationSpec matching NavigationBundleSpecType.CharSequenceType either directly or wrapped by NavigationBundleSpecType.OptionalType

Return

the NavHostResultHandler

Parameters

ViewModel

the type of BaseLifecycleViewModel associated with the NavHostResultHandler

retain

If true the result will be retained in the NavBackStackEntry. It will be deleted otherwise.

onResult

Method for handling the received CharSequence or null