TestListScreen

@Composable
fun TestListScreen(    listHeader: String,     testList: List<TestDetails>,     swipeRefreshState: SwipeRefreshState,     onRefresh: () -> Unit,     listItem: @Composable (testDetailsItem: TestDetails, isExpanded: Boolean, onExpandButtonClick: () -> Unit, onClick: () -> Unit, is24hourFormat: Boolean) -> Unit)

A stateful composable that is used to display a list of TestDetails as expandable cards.This composable adds support for swipe-to-refresh and a 'scroll-to-top' fab that appears after the first two items are pushed off of the screen while scrolling. It manages the expanded states and also the onClick action, which will toggle between expanded/not expanded states.

Parameters

listHeader

the header text of the list.

testList

the list of TestDetails to be displayed on the screen.

swipeRefreshState

the state object to be used to control or observe the SwipeRefresh state.

onRefresh

Lambda which is invoked when a swipe to refresh gesture is completed.

listItem

used to specify the appearance of each item in the list. The lambda provides the testDetailsItem,isExpanded,onExpandedButtonClick, onClick (which has a default behaviour of expanding the card) and is24hourFormat.