private suspend fun toRoundedDrawable( url: String, context: Context, ) = httpClient.bitmapForUrl(url)?.let { bitmap -> RoundedBitmapDrawableFactory.create(context.resources, bitmap).apply { isCircular = true setAntiAlias(true) } }
Gets a rounded drawable from a URL if possible, else null.