Skip to content

[FR]: In the file ScrollbarExt.kt there is room for reducing the logic and code repeating in order to improve the reusability and maintainability #1549

Closed
@rodrigodiasferreira

Description

@rodrigodiasferreira

Is there an existing issue for this?

  • I have searched the existing issues

Describe the problem

In the file ScrollbarExt.kt file there is room for reducing the logic and code repeating in order to improve the reusability and maintainability.
Moreover, this improvement will make it better for developers who use the nia sample to study, and learn ways to use Kotlin to increase resusability.
The scrollbarState extension function for the LazyListState, LazyGridState, LazyStaggeredGridState have a lot of common logic that could be unified.

Describe the solution

My suggestion is to unify into a more generic extension function:
<LazyState : ScrollableState, LazyStateItem> LazyState.genericScrollbarState

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions