appyx
appyx copied to clipboard
Provide an instance of MotionContoller to InteractionModel instead of a lambda
At the moment InteractionModel
takes a lambda parameter that returns an instance of a MotionContoller
. This approach is not convenient for the clients when they need to observe MotionContoller
. For instance, they may need to observe SpotlightSlider
scroll position. Additionally, with every new MotionContoller
instance, ui cache can not be reused. It will result in creating new instances of MutableUiState
which will result in flickering
To consider before any PR: we'll still want to allow replacing the MotionController
instance as per #402