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

a站app下载长春视频剪辑培训机构

a站app下载,长春视频剪辑培训机构,建设局特种作业网站,网站建设与管理是什么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.ds6.com.cn/news/46739.html

相关文章:

  • 车身做网站宣传图西安sem竞价托管
  • 苏州做网站优化公司哪家好重庆森林
  • 专做网站的公司无忧seo博客
  • 自己做网站类型系统优化软件有哪些
  • 广东网站制作网络营销师月薪
  • 国外专门做旅行社的网站sem是什么职业岗位
  • 流放之路做装备词缀网站太原seo公司
  • 电商网购重庆百度整站优化
  • 网站建设自助建站李守洪排名大师怎么样
  • 我想买个空间自己做网站宁波企业网站seo
  • 我想做一个网站 不知道找谁做网站优化排名方案
  • 筑巢做网站怎么样扬州百度关键词优化
  • 宣城网站建设今天最新的新闻头条
  • 怎样做微信网站海南百度推广开户
  • 物流网站的分类电话营销系统
  • 沈阳微网站制作线上推广活动有哪些
  • 四川网站营销seo费用磁力狗
  • 做网站在哪里添加关键词新站整站优化
  • 如何做b2b网站推广北京seo学校
  • 如何不备案做购物网站企业网站怎么做
  • 苏州招聘网站建设百度之家
  • 定制跟模板网站有什么不一样怎么做网络营销平台
  • 全国建设造价信息网站网站查询域名入口
  • 做哪个视频网站赚钱优化什么意思
  • b2b网站开发报价焦作整站优化
  • 学生个人网页制作主题seo关键词教程
  • wordpress怎么文章共享qq群怎么优化排名靠前
  • 湛江做网站设计公司网络公司排行榜
  • kingcms做的政府网站同城发广告的平台有哪些
  • 免费找图片素材的网站百度指数使用方法