好吧,我自己找到了一个简单的解决方案。只要把SafeArea包含在堆栈中就可以了。
Stack(
children: <Widget>[
SafeArea(
child: //add you widgets,
),
loading == true?
Container(
color: Colors.black.withAlpha(100),
height: screenHeight,
width: screenWidth,
): Container()
]
)