我使用MediaQuery.of(Context).viewInsets.Bottom来根据键盘大小确定填充.在升级到Ffltter 3.10之后,现在底片被键盘重叠了!
void onTotalsButtonPressed() {
showModalBottomSheet(
context: context,
builder: (context) => SingleChildScrollView(
padding:
EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: AddProduct(
items: Provider.of<Products>(context, listen: false).searchItems,
type: OrderTypes.sales,
),
),
isScrollControlled: true,
);
}
当我在我的另一台机器上用Ffltter 3.7.12构建应用程序时,它工作得很好,填充是根据键盘状态动态确定的!