English 中文(简体)
胎体 Sheet不尊重安全区
原标题:Scaffold s BottomSheet does not Respect Safe Area
  • 时间:2024-03-08 17:46:51
  •  标签:
  • flutter
The bounty expires in 4 days. Answers to this question are eligible for a +50 reputation bounty. user2232305 wants to draw more attention to this question:
A working solution and maybe an explanation on why it’s happening
    return Scaffold(
      appBar: AppBar(...),
      bottomSheet: _buildBottomSheet(context),
      body: SingleChildScrollView(...)

我要谈的问题是,底板掩盖了滚动观点的下部分。 期望的是,Schaf(例如,滚动观点)的体会尊重底板。 (毛底板是带纽子的简单集装箱。)

我用“彩虹”网络来处理这个问题。

问题回答

在这种情况下,你可以利用安全援助解决问题。

return Scaffold(
  appBar: AppBar(...),
  bottomSheet: _buildBottomSheet(context),
  body: SafeArea(SingleChildScrollView(...)),

你可以尝试SafeArea widget

SafeArea is a widget that insets its child by sufficient padding to avoid intrusions by the operating system. For example, this will indent the child by enough to avoid the status bar at the top of the screen.

在您的案例中,只是试图用<代码>safearea来总结你的母团植被。





相关问题
Flutter App cannot be installed on Android TV

I m building a Flutter app that should support Android TV and Mobile devices. Despite Google Play shows that it is supported, I cannot install app on my MiBox device. While trying to install it, both ...

Moving the icon button to the right causes rendering issues

I am trying to align the icon button to the right of the Text field, I tried the row which made the icon button not centered vertically and now I am trying out the Stack widget. Here is my code - ...

热门标签