getComponentOffsetFromTop<T> method
Gets the offset of the specified component from the top of viewport.
extent: The available space and configuration of the MultiStateSheet.component: The component whose offset from the top is requested.- Returns the offset of the specified component.
Implementation
double getComponentOffsetFromTop<T>(
MultiStateSheetExtent<T> extent, Components component) =>
switch (component) {
Components.header => 0.0,
Components.top => -extent.initialComponentSizes.topHeader,
Components.content => extent.initialComponentSizes.header,
Components.footer =>
extent.offset - extent.initialComponentSizes.footer,
};