You see that onclick function behind you has been disturbing me for the last 6 hours I didn't know how to implement it since I wanted my cards to be clicked and you have helped me solve it also its midnight so I can sleep easy tonight so thanks and God bless
Also, shouldn't modifier be passed at the end with .then(modifier) extension? Modifier is order sensitive, and passing a modifier at the beginning can break effects created by further extensions.
Exactly. With the current implementation you can't override the hardcoded background colour, for example. And what's worse, without looking into the actual implementation you will have no idea which attributes can, and which cannot be overridden by a modifier argument. Which makes for poor API.
I know that passing a defaulted Modifier is good practice, but this always seemed to me like a very awkward "backdoor" since it is not clear what the caller is expected to modify. There is no clear expectation as opposed to the other function parameters.
@@ChrisAthanas I mean Modifier, in your composable function signature, should be the first optional parameter. In your first comment you said that should be the first parameter at all.
@@nesletchimaew9209 yes, you obviously have to pass the density to the converter, eg. to the toPx function. that's why it's an extension function of the Density interface. it doesn't change the fact that it's already implemented. all you've got to do is something like with(LocalDensity.current) { someValueInDp.toPx() } and thta's it. if you've rolled out a custom class for such calculations, you're doing it wrong.
@@PhilippLackner yes I have watched it completely but I still am unclear and can't create simple projects your recent video on Roadmap of Android Development you suggested to create projects but I am really having a hard time since Jetpack Compose is still very new and also do I have to learn XML now that we have Jetpack Compose?
This is not a bug its a design. The first time u will have to reuse this component you will just refactor 😂😂😂😂 Stop making trivial stuff sound very serious. None of us get stuff right the first time.