Bottombanvar в iOS -телефонах добавляет дополнительную прокладку под нижней частью. src = "https://i.sstatic.net/xeaau3cg.png"/>
В Android это работает просто хорошо, но в устройствах iOS этот вопрос возникает
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) {
if (!didPop) {
final focus = FocusScope.of(context);
if (!focus.hasPrimaryFocus && focus.focusedChild != null) {
focus.unfocus(); // Closes the keyboard
}
}
},
child: Scaffold(
backgroundColor: context.color.grayScale.grey12,
extendBody: true,
resizeToAvoidBottomInset: false,
body: _widgetOptions.elementAt(_selectedIndex),
floatingActionButton: keyboardIsOpened
? null
: SizedBox(
width: 52,
height: 52,
child: FloatingActionButton(
heroTag: 'searchgymButton_${DateTime.now().toString()}',
tooltip: 'search',
isExtended: true,
onPressed: () {
_onItemTapped(2);
},
child: SvgPicture.asset(
AssetPaths.home_search,
),
backgroundColor: context.color.primary.cyan500,
shape: CircleBorder(),
),
),
floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
bottomNavigationBar: BottomAppBar(
height: 80,
surfaceTintColor: context.color.grayScale.grey11,
notchMargin: 8,
// padding: EdgeInsets.all(0),
color: context.color.grayScale.grey11,
shape: const CircularNotchedRectangle(),
clipBehavior: Clip.antiAlias,
child: Container(
color: Colors.transparent,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
_buildNavItem(0, AssetPaths.home2, 'my_gyms'.tr()),
_buildNavItem(1, AssetPaths.scanner, 'nfc_check'.tr()),
SizedBox(
width: 50,
),
_buildNavItem(3, AssetPaths.support, 'support'.tr()),
_buildNavItem(4, AssetPaths.profile, 'profile'.tr()),
],
),
),
),
),
);
Подробнее здесь: https://stackoverflow.com/questions/796 ... -flutter-i
Как избежать дополнительного пространства, которое идет ниже нижнего запчана в приложениях Flutter iOS ⇐ IOS
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение