LoadingItemUI
fun LoadingItemUI( containerModifier: Modifier = Modifier, animations: UIAnimations? = null, textStyle: TextStyle = TextStyle.Default, loadingRoutine: suspend () -> Boolean, initialDelay: Long? = null, contentLoaded: @Composable () -> Unit, themeColor: Color = MaterialTheme.colorScheme.primary, loadingIndicator: @Composable () -> Unit = {
Surface {
Column(
modifier = containerModifier
.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
CircularProgressIndicator(
modifier = Modifier
.size(85.dp),
strokeWidth = 8.dp
)
Text(
modifier = Modifier
.padding(
top = 16.dp
),
style = textStyle,
text = stringResource(Res.string.loading_data),
color = themeColor
)
}
}
})
Method used to display a layout when a list of values is empty
Parameters
containerModifier
The modifier to apply to the container column
animations
The set of the animations to use to animate the layout
textStyle
The style to apply to the text
loadingRoutine
The routine used to load the data
initialDelay
An initial delay to apply to the loadingRoutine before to start
loadingIndicator
The loading indicator to display
contentLoaded
The content to display when the data have been loaded
themeColor
The color to use into the composable