Closed aptech73 closed 1 month ago
🤔 No sure how this could be fixed. Should the name "content" be treated as an special case? Or should this be a good candidate for a suppress?
I know that Compose libraries have the similar rule for Android Lint, I wonder how they solve it, might check this.
But I also remembered that we have already had similar issue and discussed the possible solutions there, and even found one which seemed nice to few of us, see this comment.
I'll try implement and include the proposed solution in the next release!
I'll close this issue in favor of #17, thanks for the report!
🤣🤣 I need to apply DRY to my issue comments 🤣🤣
Good afternoon, colleagues.
I found an interesting feature, if Modifier is located above the required parameter of LazyListScope type (probably for all elements of Scope type) in the argument list, the linker generates an error:
@Composable fun CustomLazyColumn(modifier: Modifier = Modifier, content: LazyListScope.() -> Unit,) { ... }
Modifier parameter should be the first parameter after required parameters (put it after "content") [ModifierParameterPosition]
However, if you arrange the arguments this way, the Modifier will not be available when CustomLazyColumn is called:
CustomLazyColumn(modifier = Modifier) { ... }
Unresolved reference: modifier
I note that in LazyColumn the modifier is placed above all arguments: