-
- All Implemented Interfaces:
-
com.ramcosta.composedestinations.result.ResultBackNavigator
public final class EmptyResultBackNavigator<R extends Object> implements ResultBackNavigator<R>
Empty implementation of ResultBackNavigator to use in previews and possibly testing.
-
-
Constructor Summary
Constructors Constructor Description EmptyResultBackNavigator()
-
Method Summary
Modifier and Type Method Description UnitnavigateBack(R result)Goes back to previous destination sending result. UnitnavigateBack()Goes back to previous destination sending the last result set with setResult or just navigating if no result was set. UnitsetResult(R result)Sets a result to be sent on the next navigateBack call. -
-
Method Detail
-
navigateBack
Unit navigateBack(R result)
Goes back to previous destination sending result.
It uses NavController.navigateUp internally to go back.
Check com.ramcosta.composedestinations.result.ResultRecipient to see how to get the result.
-
navigateBack
Unit navigateBack()
Goes back to previous destination sending the last result set with setResult or just navigating if no result was set.
It uses NavController.navigateUp internally to go back.
-
setResult
Unit setResult(R result)
Sets a result to be sent on the next navigateBack call.
Check com.ramcosta.composedestinations.result.ResultRecipient to see how to get the result.
If multiple calls are done, the last one will be the result sent back. This also applies if you call navigateBack (with result) after calling this.
-
-
-
-