Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
fun main() {
val contact = Contact(PhoneNumber("12345"))
show(contact.phoneNumber) // "Phone number: 12345"
val contactWithInvalidPhoneNumber = Contact(PhoneNumber(""))
show(contactWithInvalidPhoneNumber.phoneNumber) // does not show anything
private fun show(phoneNumber: PhoneNumber) {
if (phoneNumber.value.isEmpty()) {
val phoneNumberScreen = PhoneNumberScreen(phoneNumber)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment