https://kotlinlang.org logo
#compose
Title
# compose
m

Marko Novakovic

01/04/2021, 11:24 AM
In the past convention was to put
Modifier
as a first parameter of a
composable
. Did it change? Am seeing more and more samples, including Google ones, with
Modifier
as the last parameter. Where it "should be" put?
f

fmasa

01/04/2021, 12:00 PM
Can you share some of these samples? AFAIK convention is that Modifier is a first optional parameter
☝🏻 3
m

Marko Novakovic

01/04/2021, 12:01 PM
@fmasa
Jetnews
for example
f

fmasa

01/04/2021, 12:04 PM
Can you be more specific? I quickly searched through it and it seems to be in line with this convention. You can still have any number of non-optional parameters before modifier.
👍 3