this.deleteIconColor, this.deleteButtonTooltipMessage, this.shape, this.clipBehavior = Clip.none, this.backgroundColor, this.padding, this.materialTapTargetSize, }) 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 3 常用属性 3.1 avatar:标签左侧Widget,一般为小图标 avat...
( primarySwatch: Colors.blue, backgroundColor: Colors.grey[200], // 设置背景颜色 ), home: MyHomePage(), ); } } class MyHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Flutter Demo Home Page'), ), body: ...
appBar:newAppBar(title:newText('Scaffold Widget Demo'),centerTitle:true,backgroundColor:Colors.red,),centerTitle:让文本居中显示。默认是居左显示 backgroundColor:导航栏背景颜色 2、backgroundColor 这个是整个Scaffold的背景颜色 3、body 主要内容的视图区域,在这个里面,展示的是你的核心内容 4、bottomNaviga...
side:side,colors:backgroundColor);_circlePath.reset();_circlePath.addArc(Rect.fromLTWH(0,0,side,side),0,2*pi);double waveWidth=side*0.8;double waveHeight=side/6;_wavePath.reset();_wavePath.moveTo(-waveWidth,radius);for(double i=-waveWidth...
widget.backgroundColor, appBarTheme.backgroundColor, colorScheme.brightness == Brightness.dark ? colorScheme.surface : colorScheme.primary, ❝ 不要被这里茫茫多的问号搞昏了,复习一下Dart语法吧。 「?.」——代表非空访问,例如「myObject?.someProperty」,等价于——「(myObject != null) ? myObject...
runSpacing:20.0,//纵轴方向的间距alignment: WrapAlignment.end,//纵轴方向的对其方式children: <Widget>[newChip( avatar: CircleAvatar( backgroundColor: Colors.blue, child:newText('A'), ), label:newText('文本一'), ),newChip( avatar: CircleAvatar( ...
Widget build(BuildContext context) { return new MaterialApp( title: 'Children Demo', home: new Scaffold( appBar: AppBar( title: new Text('Children Demo'), ), body: new Column( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ new Text('11111111111'), new Text('22222222222'), ...
title:newText('Scaffold Widget Demo'), centerTitle:true, backgroundColor: Colors.red, ), centerTitle:让文本居中显示。默认是居左显示 backgroundColor:导航栏背景颜色 2、backgroundColor 这个是整个Scaffold的背景颜色 3、body 主要内容的视图区域,在这个里面,展示的是你的核心内容 ...
3.1 backgroundColor:背景颜色 代码语言:txt 复制 backgroundColor: Colors.white, 3.2 currentIndex:项目索引 代码语言:txt 复制 currentIndex:0, 3.3 elevation :底部导航栏的Z坐标 代码语言:txt 复制 elevation:8.0, 3.4 fixedColor:选中项目颜色的值(只读) ...
static const ColorScheme lightColorScheme = ColorScheme( primary: Color(0xFFB93C5D), onPrimary: Colors.black, secondary: Color(0xFFEFF3F3), onSecondary: Color(0xFF322942), error: Colors.redAccent, onError: Colors.white, background: Color(0xFFE6EBEB), ...