是个没有实际效果的控件,也是个底层的控件,可以用来设置
阴影
,形状
,阴影
,颜色
,文字格式
等等
this.type = MaterialType.canvas,
this.elevation = 0.0,
this.color,
this.shadowColor = const Color(0xFF000000),
this.textStyle,
this.borderRadius,
this.shape,
this.borderOnForeground = true,
this.clipBehavior = Clip.none,
this.animationDuration = kThemeChangeDuration,
示例
new Material(
color: Colors.blueAccent,
shape: new BeveledRectangleBorder(//斜角矩形边框
side:new BorderSide(
width: 1.0,
color: Colors.blueAccent,
style: BorderStyle.none,
),
borderRadius:new BorderRadius.circular(10.0),
),
child: new Container(
padding: EdgeInsets.all(20.0),
child: new Text('斜角矩形边框'),
),
),