Skip to content

Instantly share code, notes, and snippets.

@balsikandar
Created May 1, 2021 19:19
Show Gist options
  • Save balsikandar/91828761a0ece7303285b6baf51ca44d to your computer and use it in GitHub Desktop.
Save balsikandar/91828761a0ece7303285b6baf51ca44d to your computer and use it in GitHub Desktop.
fun main() {
if (pickupSelected && dropSelected) return gotoNextPage()
if (selectedTab === "PICKUP_POINT") {
verifyPickup(pickupSelected)
}
if (selectedTab === "DROP_POINT") {
verifyDropOff(dropSelected)
}
}
private fun verifyPickup(pickupSelected: Boolean) {
if (pickupSelected) {
goToDrop();
} else {
toast("Please select pickup location")
}
}
private fun verifyDropOff(dropSelected: Boolean) {
if (dropSelected) {
goToPickup();
} else {
toast("Please select drop location")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment