如何解决更改为方向抖动时页面变为空白
我正在使用Flutter应用程序中的底部导航栏。当我转到第4个索引并更改方向时,该页面将变为空白,而当我更改选项卡并移至第4个时,它将正常工作。对于底部导航栏,我正在使用`
引发的错误为E/eglCodecCommon( 6748): goldfish_dma_create_region: could not obtain fd to device! fd -1 errno=2
bottomNavigationBar: Container(
decoration: BoxDecoration(color: Colors.white,boxShadow: [
BoxShadow(blurRadius: 20,color: Colors.black.withOpacity(.1))
]),child: SafeArea(
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 15.0,vertical: 8),child: GNav(
gap: 8,activeColor: Colors.white,iconSize: 24,padding: EdgeInsets.symmetric(horizontal: 20,vertical: 5),duration: Duration(milliseconds: 200),tabBackgroundColor: UniversalVariables.mainCol,tabs: [
GButton(
icon: LIST_ICON,iconColor: UniversalVariables.mainCol,text: 'Master List',backgroundGradient: UniversalVariables.navBarGradient,),GButton(
icon: PERSONAL_ICON,text: 'Personal List',GButton(
icon: CHAT_ICON,text: 'Chat',GButton(
icon: ACCOUNT_ICON,text: 'Profile',],selectedIndex: _currentIndex,onTabChange: (index) {
setState(() {
_currentIndex = index;
_pageController.jumpToPage(index);
});
}),```
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。