美文网首页
2020-05-12 Flutter Container

2020-05-12 Flutter Container

作者: rub1cky | 来源:发表于2020-05-12 22:04 被阅读0次
    Container({
        Key key,
        this.alignment, // 内部对齐方式
        this.padding, // padding值
        this.color, // 背景色 和 decorator 不能共存
        this.decoration,
        this.foregroundDecoration,
        double width, // 宽
        double height,//高
        BoxConstraints constraints,
        this.margin,
        this.transform, // 设置旋转什么的
        this.child,
        this.clipBehavior = Clip.none,
      })
    

    Demo


    截屏2020-05-12 下午10.04.39.png
    Container(
          height: 200,
          width: 200,
    //      color: Colors.green,
            padding: EdgeInsets.all(20),
          decoration: BoxDecoration(
              border: new Border.all(width: 5), // 边色与边宽度
              color: Color(0xFF9E9E9E), // 底色
              borderRadius: new BorderRadius.vertical(top: Radius.elliptical(20, 50)),
          ),
          transform: Matrix4.rotationZ(0.3),
          child: Container(
            color: Colors.red,
            width: 100,
            height: 100,
            alignment: Alignment.center,
            child: Text("Hello world"),
          ),
        );
    

    相关文章

      网友评论

          本文标题:2020-05-12 Flutter Container

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