viewModelOnClearedFlow

fun ViewModelLifecycleOwner.viewModelOnClearedFlow(): Flow<Unit>

Add an observer and get notified only once when the ViewModel is cleared. The observer will be removed from the ViewModelLifecycle once get notified.