Flutter之交互类型组件FloatingActionButton
·
FloatingActionButton buildFloatingActionButton(){
return FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
foregroundColor: Colors.red,//图标颜色
backgroundColor: Colors.yellow,
focusColor:Colors.tealAccent,//有焦点的输入按钮的颜色
hoverColor: Colors.white,
splashColor: Colors.red,
heroTag:null, //hero动画
elevation: 10.0,//z轴阴影大小,默认6
);
}
FloatingActionButton buildFloatingActionButtonExtended(){
return FloatingActionButton.extended(
onPressed: _incrementCounter,
tooltip: 'Increment',
icon: Icon(Icons.done),
label: new Text('恭喜你完成'),
foregroundColor: Colors.red,//图标颜色
backgroundColor: Colors.yellow,
focusColor:Colors.tealAccent,//有焦点的输入按钮的颜色
hoverColor: Colors.white,
splashColor: Colors.red,
heroTag:null, //hero动画
elevation: 10.0,//z轴阴影大小,默认6
);
}
更多推荐


所有评论(0)