博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Flutter BottomAppBar插入FAB
阅读量:7143 次
发布时间:2019-06-29

本文共 1312 字,大约阅读时间需要 4 分钟。

import 'package:flutter/material.dart';void main() => runApp(new BottomAppBarDemo());class BottomAppBarDemo extends StatelessWidget {  @override  Widget build(BuildContext context) {    return MaterialApp(        home: Scaffold(      appBar: AppBar(        title: Text("BottomAppBar"),      ),      floatingActionButton: FloatingActionButton(        onPressed: null,        child: Icon(Icons.add),      ),      floatingActionButtonLocation: FloatingActionButtonLocation.endDocked,      bottomNavigationBar: BottomAppBar(        child: BottomNavigationBar(          items: 
[ BottomNavigationBarItem(icon: Icon(Icons.add), title: Text("add")), BottomNavigationBarItem( icon: Icon(Icons.delete), title: Text("delete")) ], ), ), )); }}复制代码

floatingActionButtonLocation 属性设置 FAB 位置

FloatingActionButtonLocation.endDockedFloatingActionButtonLocation.centerDockedFloatingActionButtonLocation.endFloatFloatingActionButtonLocation.centerFloat复制代码
floatingActionButtonLocation: FloatingActionButtonLocation.endDocked:复制代码

floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked:复制代码

floatingActionButtonLocation: FloatingActionButtonLocation.endFloat:复制代码

floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat:复制代码

转载地址:http://tszgl.baihongyu.com/

你可能感兴趣的文章
在IIS8添加WCF服务支持
查看>>
(转)代码执行的效率
查看>>
第一天用MongoDB
查看>>
Linux服务器部署系列之二—MySQL篇
查看>>
STM32笔记记录3
查看>>
typedef关键字
查看>>
EntityType 'UserInfo' has no key defined. Define the key for this EntityType.
查看>>
Merge PDF File using itextsharp library
查看>>
使用微软的TFS云服务
查看>>
[已解]如何设置xib 中 ipad 的开发模式为横屏
查看>>
Repeater控件使用
查看>>
[Android] 华为荣耀2制作fastboot线刷包[海思平台]
查看>>
慢慢 的变老
查看>>
高效能TCP通讯基础组件Beetle.Express
查看>>
MyEclipse内存不足配置
查看>>
四舍五入网络Java保留两位小数
查看>>
MFC 循环界面假死的解决(MFC 按钮终止循环)
查看>>
详细解说九宫图比较常用的多控件布局
查看>>
程序员的出路在哪里?挣钱的机会来了续-福利来了,仿QQ界面,放出全部源码,打造创业框架及实现思路...
查看>>
C语言中的 (void*)0 与 (void)0
查看>>