当前位置:网站首页>Shutter bottomnavigationbar toggle page hold
Shutter bottomnavigationbar toggle page hold
2022-06-29 20:55:00 【Boundless sky 6688】
1、tabBar Each corresponding page implements AutomaticKeepAliveClientMixin, Value changed to true
2、tabBar For each page build() Method call super.build(context);
3、PageView Set in physics: const NeverScrollableScrollPhysics(), // No sliding
return Scaffold(
body: PageView.builder(
controller: _controller,
physics: const NeverScrollableScrollPhysics(), // No sliding
itemCount: list.length,
itemBuilder: (context, index) => list[index],
),
bottomNavigationBar: initBottomNavigationBar(),
);
/// Setup page
class SettingPage extends StatefulWidget{
const SettingPage({Key? key}):super(key: key);
@override
State<SettingPage> createState() =>SettingState();
}
/// Realization AutomaticKeepAliveClientMixin
class SettingState extends State<SettingPage> with AutomaticKeepAliveClientMixin{
@override
Widget build(BuildContext context) {
super.build(context); // call super.build(context);
return Scaffold(
appBar: AppBar(title: const Text(" Set up the center "),),
);
}
@override
bool get wantKeepAlive => true; // Change it to true
}
Concrete realization
Detailed code view Flutter BottomNavigationBar With page switching example
边栏推荐
- Storage principle of string
- 解释PBR纹理贴图(texture-maps)
- Cmake开发-多目录工程
- 《强化学习周刊》第51期:PAC、ILQL、RRL&无模型强化学习集成于微电网络格控制:综述与启示
- Curl download example
- Go: how to write a correct UDP server
- ads131a04 ADC verilog实现及仿真
- Analysis on the true topic of "cost management" by Guangdong second-class cost engineer
- Bigder:自动化测试工程师
- Comparable比较器写法&ClassCastExcption类转换异常
猜你喜欢

VHDL电话计费系统设计

The explain statement in MySQL queries whether SQL is indexed, and several types in extra collate and summarize

「运维有小邓」AD域委派

如何评价科大讯飞AI翻译笔P20系列,值得买吗?

Set up your own website (12)

. NETCORE unified authentication authorization learning - first authorization (2)

"Xiaodeng" ad domain delegation for operation and maintenance

CorelDRAW2022全新版V24.1.0.360更新

时钟树综合(CTS)
![Navigation experiment [microcomputer principle] [experiment]](/img/79/8311a409113331e72f650a83351b46.png)
Navigation experiment [microcomputer principle] [experiment]
随机推荐
一颗新的北极星已经升起!
Exit operation in project
「运维有小邓」审核并分析文件和文件夹访问权限
注解
Win7 easy connect 提示:选路连接失败,可能当前连接网络异常,请稍后重试
PostgreSQL Weekly News - 22 juin
"Xiaodeng" active directory batch user creation in operation and maintenance
Final review [microcomputer principle]
How to use filters in jfinal to monitor Druid for SQL execution?
炒股开户请问哪个券商佣金是最低最安全的
如何在 SAP BTP ABAP 编程环境里直接调用 ABAP On-Premises 系统的 RFC 函数
Bigder:自动化测试工程师
2021 CCPC Harbin J. local minimum (thinking question)
Bigder: Automation Test Engineer
跳转打开新窗口
Detailed description of gaussdb (DWS) complex and diverse resource load management methods
How to judge the quality of conductive slip ring from its appearance
数字密码锁verilog设计+仿真+上板验证
Navigation experiment [microcomputer principle] [experiment]
CAD assistant - 3D model format conversion tool