当前位置:网站首页>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
边栏推荐
- [today in history] June 29: SGI and MIPS merged; Microsoft acquires PowerPoint developer; News corporation sells MySpace
- 如何审核 Active Directory 用户账户更改?
- Set up your own website (12)
- [a must for reptiles - > scrapy framework from black iron to king] first chapter - detailed explanation of 10000 character blog posts (recommended Collection)
- 智能门锁主流品牌有哪些?选购门锁时要注重产品的哪些特性?
- 「运维有小邓」日志分析工具使用越来越频繁的原因
- Jump to open a new window
- 管理人员应具备的基本素质
- Go: how to write a correct UDP server
- Three. JS development: drawing of thick lines
猜你喜欢

verilog实现串口通信发送到数码管

PostgreSQL Weekly News - 22 juin

Clock tree synthesis (CTS)

The reason why the log analysis tool of "operation and maintenance" is used more and more frequently

直播预告 | PostgreSQL 内核解读系列第一讲:PostgreSQL 系统概述

阿里云发布《中国机器人产业图谱(2022)》,122页pdf

18. `bs object Node name next_ sibling` previous_ Sibling get sibling node

「运维有小邓」日志分析工具使用越来越频繁的原因

Analysis on the true topic of "cost management" by Guangdong second-class cost engineer

「运维有小邓」Active Directory批量用户创建
随机推荐
[a must for reptiles - > scrapy framework from black iron to king] first chapter - detailed explanation of 10000 character blog posts (recommended Collection)
mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
Uncover the secret! Pay attention to those machines under the membership system!
Analysis on the true topic of "cost management" by Guangdong second-class cost engineer
Bigder: Automation Test Engineer
[buuctf.reverse] 142_ [SUCTF2019]babyunic
Stm32cubemx learning (6) external interrupt experiment
Xiaomi written test real question 1
HAproxy + Keepalive实现LDAP代理服务
leetcode:370. 区间加法
At least 3 years for learning amplifier?
Jupyter service installation and startup
[cloud native practice] kubesphere practice - Multi tenant system practice
How to call RFC function of ABAP on premises system directly in SAP BTP ABAP programming environment
THREEJS基础入门
Gstreamer应用开发实战指南(五)
Is it safe to open an account with flush for stock trading?
Enter the year and month to find the total number of days in the month
Wangedit rich text editor usage (detailed)
Flutter BottomNavigationBar带有页面切换示例