Show custom/random colours in compose screen

This commit is contained in:
Moez Bhatti
2019-12-26 19:34:39 -05:00
parent 6842374254
commit d6dcc55a36
4 changed files with 61 additions and 5 deletions
@@ -0,0 +1,13 @@
package com.moez.QKSMS.extensions
inline fun <K, T> Iterable<T>.associateByNotNull(keySelector: (T) -> K?): Map<K, T> {
val map = hashMapOf<K, T>()
forEach { value ->
val key = keySelector(value)
if (key != null) {
map[key] = value
}
}
return map
}