Skip to content

Commit

Permalink
Merge pull request #37 from cheonjaeung/deprecate-span-integer
Browse files Browse the repository at this point in the history
Deprecate span modifier with an integer parameter
  • Loading branch information
cheonjaeung authored Jan 31, 2025
2 parents 130c887 + 7bf2eeb commit b16b9f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/span.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ VerticalGrid(columns = SimpleGridCells.Adaptive(30.dp)) {

There is a convenience modifier that just takes an integer span.

!!! warning
Span with an integer parameter is deprecated after 2.3.0.
Replace it to the span with lambda parameter.

```kotlin
HorizontalGrid(rows = SimpleGridCells.Fixed(3)) {
Item()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ interface GridScope {
* at the next line.
*/
@Stable
@Deprecated(
"Span modifier with an integer parameter is deprecated. " +
"Please use another span modifier with lambda parameter.",
ReplaceWith("this.span { span }")
)
fun Modifier.span(span: Int): Modifier

/**
Expand Down

0 comments on commit b16b9f4

Please sign in to comment.