To improve visibility of the user I want to animate the visibility of the floating action button in the in the client screen after the first
five element is scrolled away from the screen.
Possible Approach:
I would achieve this using the lazy list state and the derivedstateof{} that observes a state and produces a new state to determine if the floating action button should be shown or removed without triggering excessive recompositing of the lazy list composable
steps to implement this feature:
[ ] move the floating action button into a separate composable function that has an argument namely the Scrollstate that would used to derive a new state by the derivedstateof() lambda .
[ ] the derived state would enable the visibility and invisibility of the floating action button without excessive recompositions.
[ ] replace the Icon composable with the newly created icon composable function in the scaffold.
Summary:
To improve visibility of the user I want to animate the visibility of the floating action button in the in the client screen after the first five element is scrolled away from the screen.
Possible Approach:
I would achieve this using the lazy list state and the derivedstateof{} that observes a state and produces a new state to determine if the floating action button should be shown or removed without triggering excessive recompositing of the lazy list composable
steps to implement this feature:
[ ] move the floating action button into a separate composable function that has an argument namely the Scrollstate that would used to derive a new state by the derivedstateof() lambda .
[ ] the derived state would enable the visibility and invisibility of the floating action button without excessive recompositions.
[ ] replace the Icon composable with the newly created icon composable function in the scaffold.
Select Type: