Scaffold bottom bar not moving up with keyboard i ...
# compose-ios
k
Scaffold bottom bar not moving up with keyboard i have added window inset safe drawing. Onfocusbehavior.donothing is also added to compose ui view controller
@etolstoy
🤔 1
a
And it shouldn't. If you want it to move you need to add imePadding for it.
k
i should add it to the bottom bar right?
👌 1
its already added
Copy code
Scaffold(
    scaffoldState = scaffoldState,
    snackbarHost = { MarkazSnackBarHost(it) },
    modifier = Modifier.windowInsetsPadding(WindowInsets.safeDrawing)
        .fillMaxSize(),
    topBar = { topBar(viewModel, destinationsNavigator, keyboardManager) },
    bottomBar = {
        BottomBar(
            modifier = Modifier.imePadding(),
            resId = resId,
            product = product,
            variation = variation,
            productViewModel = productViewModel,
            quantity = quantity,
            profit = profit,
            destinationsNavigator = destinationsNavigator,
            viewModel = viewModel,
            scope = scope,
            costumerPrice = costumerPrice,
            scaffoldState = scaffoldState,
            keyboardManager = keyboardManager
        )
    }
) { paddingValues ->
    AddToBagState(
        addingToBag = addingToBag,
        scope = scope,
        scaffoldState = scaffoldState,
        destinationsNavigator = destinationsNavigator
    )

    Screen(
        paddingValues = paddingValues,
        resId = resId,
        product = product,
        variation = variation,
        quantity = quantity,
        profit = profit,
        totalProfit = totalProfit,
        costumerPrice = costumerPrice,
        isProfitTooMuch = isProfitTooMuch
    ) {
        variation = it
    }

}
@Composable
private fun BottomBar(
    modifier: Modifier = Modifier,
    resId: String,
    product: ProductDetailsDomainModel,
    variation: ProductVariationDTO,
    productViewModel: ProductDetailsViewModel,
    quantity: MutableState<Int>,
    profit: MutableState<String>,
    destinationsNavigator: Navigator,
    viewModel: CoreViewModel,
    scope: CoroutineScope,
    scaffoldState: ScaffoldState,
    getUserLoggedInStatus: GetUserLoggedInStatus = koinInject(),
    bottomSheetNavigator: BottomSheetNavigator = LocalBottomSheetNavigator.current,
    costumerPrice: MutableState<Long>,
    keyboardManager: SoftwareKeyboardController?,
) {
    LoginScreenHelper(dummyStateChangeLambda = {

    }, message = "Apne orders dekhny ke liye login karein")
    val productState by viewModel.flushProductData.collectAsState()

    Column(
        modifier = modifier.fillMaxWidth().background(LocalMarkazColors.current.surface)
    ) {
}
a
Try adding ime padding for scaffold itself
k
tried didnt work
adding ime padding to the top level composable fixed it
👍 1