当前位置:网站首页>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
边栏推荐
- 「运维有小邓」Active Directory批量用户创建
- CorelDRAW2022全新版V24.1.0.360更新
- Go deep into the underlying principles of go and rewrite redis middleware without secret
- 18. `bs对象.节点名.next_sibling` previous_sibling 获取兄弟节点
- varnish 503 no backend connection – varnish健康检查
- The reason why the log analysis tool of "operation and maintenance" is used more and more frequently
- 解释PBR纹理贴图(texture-maps)
- What problems should be avoided when using the points mall games for marketing?
- mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
- Calibration, correction and world coordinate calculation of binocular stereo vision camera (openCV)
猜你喜欢

leetcode:370. 区间加法

广东二级造价工程师《造价管理》真题解析

Gstreamer应用开发实战指南(五)

CAD assistant - 3D model format conversion tool

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

How to evaluate iFLYTEK AI translation pen P20 series? Is it worth buying?

Alibaba cloud released the atlas of China's robot industry (2022), 122 Pages pdf

导航【微机原理】

"Operation and maintenance department has Xiao Deng" to review and analyze file and folder access rights

数字密码锁verilog设计+仿真+上板验证
随机推荐
计算成像前沿进展
60天远程办公经验分享 | 社区征文
[today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace
HAproxy + Keepalive实现LDAP代理服务
Golang basic learning
CAD assistant - 3D model format conversion tool
WPF measurement string display size
Cmake开发-多目录工程
Special training of C language array
High energy live broadcast, a gathering of celebrities! We invite you to explore bizdevops.
每周招聘|DBA数据工程师,年薪35+ ,梦起九州,星河灿烂!
推荐书籍--白夜行
Jump to open a new window
Gstreamer应用开发实战指南(五)
注解
Calibration, correction and world coordinate calculation of binocular stereo vision camera (openCV)
实现inotify配合rsync实时备份
How to call RFC function of ABAP on premises system directly in SAP BTP ABAP programming environment
I found another cross domain method by chance. I don't know if anyone has ever played this way
Curl download example