当前位置: 首页 > news >正文

淘宝客导购网站建设搜索营销

淘宝客导购网站建设,搜索营销,清远建设工程招投标网站,33岁改行做网站建设Scaffold简介 相当于界面的主体(类似于安卓最外层PhoneWindow),组件的展示都必须依附于它。 使用场景: 每一个界面都是脚手架,通过它来进行架构实现,优美的布局效果。 属性作用appBar顶部的标题栏body显示整…

Scaffold简介

相当于界面的主体(类似于安卓最外层PhoneWindow),组件的展示都必须依附于它。

使用场景:

每一个界面都是脚手架,通过它来进行架构实现,优美的布局效果。

属性作用
appBar顶部的标题栏
body显示整体布局
floatingActionButton右下角按钮
floatingActionButtonLocation按钮的位置
floatingActionButtonAnimator按钮动画
drawer左侧滑动组件
onDrawerChanged滑动事件监听
endDrawer右侧滑动组件
onEndDrawerChanged编辑完成
bottomNavigationBar底部菜单组件
backgroundColor背景色
persistentFooterButtons显示在基架底部的一组按钮
resizeToAvoidBottomInset如果脚手架上方显示屏幕键盘,则可以调整机身大小以避免与键盘重叠,从而防止机身内部的小部件被键盘遮挡。

endDrawer 属性效果

      endDrawer: Container(color: Colors.white,width: 200,child: Center(child: Column(children: [Text('测试endDrawer'),Text('测试endDrawer'),],),),)

在这里插入图片描述

floatingActionButton 属性
floatingActionButtonLocation: 属性 startFloat、centerFloat、endFloat、 等几个属性

floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
floatingActionButton: FloatingActionButton(onPressed: () {},tooltip: 'Increment',child: const Icon(Icons.add),)

FloatingActionButtonLocation.startFloat
在这里插入图片描述
在这里插入图片描述

body: 属性代表布局的身体,相当于红色这一区域;
backgroundColor: 整体红色区域部分的背景颜色;

在这里插入图片描述

drawer: 左侧滑动组件

  drawer: Container(color: Colors.white,width: 200,child: Center(child: Column(children: [Text('测试drawer'),Text('测试drawer'),],),),),

在这里插入图片描述

bottomNavigationBar: 底部菜单栏按钮

   bottomNavigationBar: BottomNavigationBar(items: const <BottomNavigationBarItem>[BottomNavigationBarItem(icon: Icon(Icons.home),label: '首页',),BottomNavigationBarItem(icon: Icon(Icons.search),label: '搜索',),BottomNavigationBarItem(icon: Icon(Icons.settings),label: '设置',),],currentIndex: _selectedIndex,selectedItemColor: Colors.blue,onTap: (index) {setState(() {_selectedIndex = index;});},)

在这里插入图片描述

persistentFooterButtons: 显示在基架底部的一组按钮。

      persistentFooterAlignment:  AlignmentDirectional.bottomEnd,persistentFooterButtons: [TextButton(onPressed: () {// 按钮1的点击事件处理逻辑},child: Text('按钮1'),),TextButton(onPressed: () {// 按钮2的点击事件处理逻辑},child: Text('按钮2'),),],

在这里插入图片描述

整体代码块

import 'package:flutter/material.dart';class ScaffoldPage extends StatefulWidget {const ScaffoldPage({Key? key}) : super(key: key);State<ScaffoldPage> createState() => _ScaffoldPageState();
}class _ScaffoldPageState extends State<ScaffoldPage> {int _selectedIndex = 0;List<Widget> _widgetOptions = [// 每个选项对应的页面或小部件// 可以根据需要替换为自己的页面或小部件Text('首页'),Text('搜索'),Text('设置'),];Widget build(BuildContext context) {return Scaffold(appBar: AppBar(title: const Text('测试脚手架'),),backgroundColor: Colors.blueAccent,body: Center(child: _widgetOptions.elementAt(_selectedIndex),),endDrawer: Container(color: Colors.white,width: 200,child: Center(child: Column(children: [Text('测试endDrawer'),Text('测试endDrawer'),],),),),drawer: Container(color: Colors.white,width: 200,child: Center(child: Column(children: [Text('测试drawer'),Text('测试drawer'),],),),),bottomNavigationBar: BottomNavigationBar(items: const <BottomNavigationBarItem>[BottomNavigationBarItem(icon: Icon(Icons.home),label: '首页',),BottomNavigationBarItem(icon: Icon(Icons.search),label: '搜索',),BottomNavigationBarItem(icon: Icon(Icons.settings),label: '设置',),],currentIndex: _selectedIndex,selectedItemColor: Colors.blue,onTap: (index) {setState(() {_selectedIndex = index;});},),floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,floatingActionButton: FloatingActionButton(onPressed: () {},tooltip: 'Increment',child: const Icon(Icons.add),),persistentFooterAlignment:  AlignmentDirectional.bottomEnd,persistentFooterButtons: [TextButton(onPressed: () {// 按钮1的点击事件处理逻辑},child: Text('按钮1'),),TextButton(onPressed: () {// 按钮2的点击事件处理逻辑},child: Text('按钮2'),),],);}
}

项目地址

https://github.com/z244370114/flutter_demo

http://www.yayakq.cn/news/331286/

相关文章:

  • 志愿者协会网站建设中国建设银行官网站e路护航
  • 企业网站设计开题报告企业所得税怎么征收2021
  • 安阳市建设安全监督站网站小鱼儿企业网站管理系统
  • 培训网站有哪些最好看免费观看高清大全大江大河
  • 国际物流东莞网站建设太原零元网站建设
  • 建网站公司营销型网站建设网页设计师培训方法
  • 自助建站系统凡科近期国际军事形势
  • 建设工程消防备案查询网站高端酒店网站模板免费下载
  • 长春网站建设企业界首做网站
  • 海口建设厅网站东莞东城国际酒店
  • 外贸网站建设便宜硬件开发工具有哪些
  • 免费小说网站怎么做免费制作微信小程序平台
  • 没有网站可以做百度推广吗wordpress 清空浏览量
  • 网站建设办法家装o2o平台有哪些
  • 一个网站的主题和设计风格惠州中小企业网站制作
  • 双阳区住房和城乡建设局网站凡科可以建设多个网站吗
  • 邮箱账号做网站用户名好不好昨天正常的网站突然显示建设中
  • mt4网站建设天津网站建设推广服务
  • 做网站怎么加视频网站设计为什么要域名
  • 六安市 网站集约化建设个人备案网站描述
  • 京东商城网站风格企业营销策划论文
  • 江阴市网站建设网站开发信息文档
  • 优化一个网站WordPress禁用自适应
  • 厦门做点击付费网站杭州建设网页
  • 泉州有哪些做网站的东莞哪家网站营销公司好
  • 电子线路板东莞网站建设wordpress基于
  • 支付宝手机网站支付进销存软件排行榜前十名
  • 营销网站建设都是专业技术人员做网站文案用哪个软件
  • 网站开发先前台和后台公益网站建设的意义
  • 湖北洪湖市建设局网站简单学生的网页代码