Jan
05/13/2022, 1:10 PMDialog(onDismissRequest = { barCodeVal = "" }) {
val product = produceState<ProductInfo?>(null) {
value = productInfoRepository.getProductByBarCode(barCodeVal)
}
if(product.value == null) {
CircularProgressIndicator()
} else {
ProductInfoCard(product.value!!)
}
}
//
@Composable
fun ProductInfoCard(product: ProductInfo) {
Row(modifier = Modifier.fillMaxSize()) {
/*Box {
AsyncImage(product.imageUrl, product.name, modifier = Modifier
.scale(3f).clip(RoundedCornerShape(20)))
}*/
Text(product.name, color = Color.Red, modifier = Modifier.padding(horizontal = 10.dp))
}
}
ste
05/13/2022, 1:19 PMCircularProgressIndicator
).
Solution 1):
Dialog(
properties = DialogProperties(
usePlatformDefaultWidth = false
)
)
Solution 2):
Set a fixed width via a modifierJan
05/13/2022, 1:20 PM