カスタムを構築しようとしbottomNavBarていますが、コードは次のようになります。
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
decoration: BoxDecoration(
color: AppColors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(scaleWidth(20)),
topRight: Radius.circular(scaleWidth(20)),
),
boxShadow: [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.1),
blurRadius: 20,
),
],
),
height: scaleWidth(59),
child: Row(
children: _buildBottomNavBarItems(context),
),
),
Container(
color: AppColors.white,
height: MediaQuery.of(context).padding.bottom,
)
],
);
}
私はこれを次のScaffoldように呼んでいます:
bottomSheet: BottomNavBar(),
しかし、問題はそれbottomNavBarが画面全体を覆っていることです! がなくても問題なくColumn動作しますが、Columnは非常に重要なのでContainer、height: MediaQuery.of(context).padding.bottom,デバイスの に応じheightてnavBarが動的に変化しSafeAreaます。(例:iPhone SEは無いbottomSafeAreaのにiPhone Xはあるので高さ調整が必要です。)
ここで何が欠けていますか?どうすれば解決できますか?
さらに情報が必要な場合は、お知らせください。