https://kotlinlang.org logo
Title
x

xetra11

02/04/2021, 7:09 AM
@Composable
    private fun emptyIcon() {
        Box(
            boxModifier,
            contentAlignment = Alignment.Center,
        ) {
            Image(bitmap = squareImage, alpha = 0.2F)
        }
    }
Since build 142 I am kinda forced to set
contentDescription
? Kinda confused since it's a
String?
and I am using named arguments... very early here 😄
k

Kirill Grouchnikov

02/04/2021, 7:33 AM
Is there a question? Content description is a mandatory parameter
x

xetra11

02/04/2021, 7:34 AM
but wasn't before right?
k

Kirill Grouchnikov

02/04/2021, 7:34 AM
It's nullable, but no default value set in the function signature. So you have to provide it explicitly.
x

xetra11

02/04/2021, 7:34 AM
I wonder what the reason was to make it mandatory
k

Kirill Grouchnikov

02/04/2021, 7:35 AM
Right there in the source and commit message
x

xetra11

02/04/2021, 7:35 AM
just for convetional sakes? Like best practise in HTML where one should always provide the
alt
attribute?
ok thx
k

Kirill Grouchnikov

02/04/2021, 7:35 AM
Accessibility is not a convention
c

Cyril Find

02/04/2021, 7:36 AM
I guess it's incentive for people to use it (if you really don't want to you can create your own
Image
composable)
x

xetra11

02/04/2021, 7:36 AM
nah I am fine - just was wondering what and why this happened after I upgraded
👍 4