当前位置:网站首页>Shutter bottomnavigationbar with page switching example
Shutter bottomnavigationbar with page switching example
2022-06-29 20:55:00 【Boundless sky 6688】
Go straight to the code
class BottomNavigationBarPage extends StatefulWidget {
const BottomNavigationBarPage({super.key});
@override
State<BottomNavigationBarPage> createState() => HomeState();
}
class HomeState extends State<BottomNavigationBarPage> {
int _selectedIndex = 0;
late final PageController _controller;
List<Widget> list = [
const MessagePage(),
const MenuPage(),
const SettingPage(),
];
@override
void initState() {
super.initState();
_controller = PageController(initialPage: _selectedIndex);
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageView.builder(
controller: _controller,
physics: const NeverScrollableScrollPhysics(), // No sliding
itemCount: list.length,
itemBuilder: (context, index) => list[index],
),
bot边栏推荐
- 【云原生实战】KubeSphere实战——多租户系统实战
- 「运维有小邓」实时监控用户登录操作
- 「运维有小邓」Active Directory 密码过期通知功能
- [cloud native practice] kubesphere practice - Multi tenant system practice
- 60 days of remote office experience sharing | community essay solicitation
- Jump to open a new window
- 【摸鱼神器】UI库秒变低代码工具——表单篇(一)设计
- LSF bsub command
- What are the mainstream brands of smart door locks? What characteristics should we pay attention to when purchasing door locks?
- AI scene Storage Optimization: yunzhisheng supercomputing platform storage practice based on juicefs
猜你喜欢

At least 3 years for learning amplifier?

如何审核 Active Directory 用户账户更改?

Win10 sets automatic dial-up networking task to realize automatic reconnection after startup and disconnection

Cmake development - Multi Directory Project

LSF-bsub命令

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

Explain PBR texture maps

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

Practical guide to GStreamer application development (V)

Advances in computational imaging
随机推荐
"Xiaodeng" in operation and maintenance monitors user login operations in real time
GoAhead WebServer移植
THREEJS基础入门
Set up your own website (12)
路由汇总带来的三层环路-解决实验
CAD assistant - 3D model format conversion tool
Rsync 建立多目录模块的方法
Cmake开发-多目录工程
广东二级造价工程师《造价管理》真题解析
AI scene Storage Optimization: yunzhisheng supercomputing platform storage practice based on juicefs
Analysis of the factors affecting the transmission signal of the conductive slip ring
High energy live broadcast, a gathering of celebrities! We invite you to explore bizdevops.
Calibration, correction and world coordinate calculation of binocular stereo vision camera (openCV)
Mysql Json 数据类型&函数
How do I audit Active Directory User account changes?
60 days of remote office experience sharing | community essay solicitation
一次 Keepalived 高可用的事故,让我重学了一遍它!
「运维有小邓」审核并分析文件和文件夹访问权限
Final review [microcomputer principle]
分析影响导电滑环传输信号的因素