Fixed
Status Update
Comments
jn...@google.com <jn...@google.com>
ap...@google.com <ap...@google.com> #2
BTW, the source code for this is fairly straightforward. I just added the source into the sample for now, but it would be nicer if we had the function.
From source:
/**
* Gets the current navigation back stack entry as a [MutableState]. When the given navController
* changes the back stack due to a [NavController.navigate] or [NavController.popBackStack] this
* will trigger a recompose and return the top entry on the back stack.
*
* @return a mutable state of the current back stack entry
*/
@Composable
public fun NavController.currentBackStackEntryAsState(): State<NavBackStackEntry?> {
return currentBackStackEntryFlow.collectAsState(null)
}
Description
ScalingLazyListItemInfo currently has the size (after scaling of the item) but not the unadjustedSize. Unfortunately due to float maths is it possible (we have seen it in some examples) to get a situation where it is not possible to get back the original size of the item from the size (Int) and scale (Float).
Adding the unadjustedOffset to the ScalingLazyListItemInfo will allow developers to know both the pre and post scaled size of the item which they may need in their calculations