如何获得此UI元素的高度和宽度(以像素为单位?
使用此获取底部导航栏的高度
MediaQuery.of(context).viewInsets.bottom
这对我有用
最终double navigationBarHeight = MediaQuery.of(context).padding.bottom