compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Is it necessary that stopFlingnAnimation method of ScrollableController to be internal?

Open LAP2 opened this issue 4 years ago • 1 comments

Hi team.

Have some strange question, according to class signature ScrollableController is public. But some helpful methods are marked internal (possibly for test reasons), and unavailable if you try reuse controller not in core modules. And it is fine but some other implementations (non test ones) based on this internal methods, that lead to hidden dependency in implementation, and finally make controller not really usable in our own implementations. For example if you want to write your custom virtual (lazy) list, for some reason, and you fine with controller and scrollable modifier, but want to change measureLazyTree method a little, and cause of hidden dependency you should copy following classes:

  • LazyListState, and all classes that it rely on, like internal inline class DataIndex, or controller
  • controller, cause LazyListState is based on controller internal methods,
  • scrollable modifier, and all things that it is rely on, like private class PlatformScrollConfig.

BTW, is ScrollableController really should be called like this, cause it doesn't really control the scroll, it control scroll animation, maybe it should be called like ScrollableAnimationController?

LAP2 avatar Jan 29 '21 15:01 LAP2

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Aug 26 '24 17:08 okushnikov