flutter控件Material

作者: super_chao | 来源:发表于2019-10-23 08:39 被阅读0次

    是个没有实际效果的控件,也是个底层的控件,可以用来设置阴影形状阴影颜色文字格式等等

        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('斜角矩形边框'),
                  ),
                ),
    

    相关文章

      网友评论

        本文标题:flutter控件Material

        本文链接:https://www.haomeiwen.com/subject/efrehctx.html