Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class NotificationBuilder( private val context: Context ) {
var title: String? = null
@get: StringRes titleRes: Int? = null
...
fun build() : Notification {
val notificationTitle = title
?: titleRes?.let { context.getString( titleRes ) }!!
...
return notification
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment