文章目录
一、Drawer 组件
二、PageView 组件
三、完整代码示例
四、相关资源
一、Drawer 组件
----
Scaffold 组件中的 drawer 参数 , 就是设置侧拉导航栏菜单的..., 为其赋值一个 Drawer 组件 ;
Drawer 组件就是侧拉菜单 , 该组件的 child 设置一个 ListView 组件 , 在列表中设置 DrawerHeader , ListTile...(20.0),
/// PageView 中单个显示的组件
child: TabContent(data: data),
);
}).toList(),
physics.../// 用于在 TabBarView 中显示的组件
class TabContent extends StatelessWidget {
const TabContent({Key key, this.data...20),
/// 设置阴影
elevation: 10,
/// 卡片颜色黑色
color: Colors.black,
/// 卡片中的元素居中显示