bool isNeedSafeArea = MediaQuery.of(context).viewPadding.bottom > 0;
SafeArea(
top: true,
bottom: false,
child: Scaffold(
...
bottomSheet: Container(
height: 60,
color: CustomColors.skinlogMain140.withOpacity(0.95),
...
SafeArea(
top: true,
bottom: false,
child: Scaffold(
...
bottomSheet: Container(
height: isNeedSafeArea ? 80 : 60,
color: CustomColors.skinlogMain140.withOpacity(0.95),
...
SafeArea(
top: true,
bottom: true,
child: Scaffold(
...
bottomSheet: Container(
height: isNeedSafeArea ? 80 : 60,
color: CustomColors.skinlogMain140.withOpacity(0.95),
Whether to avoid system intrusions on the bottom side of the screen.
SafeArea(
top: true,
bottom: false,
child : ...
)
top
bottom
You can check if the top and bottom padding> 0 to see if the user's device has a notch to it:
window.viewPadding