美文网首页
EdgeInsetsGeometry

EdgeInsetsGeometry

作者: 翱翔的土豆 | 来源:发表于2020-02-05 20:13 被阅读0次

abstract class (需要补充父类方法)

EdgeInsets extends EdgeInsetsGeometry
EdgeInsetsDirectional extends EdgeInsetsGeometry

1. EdgeInsets

EdgeInsets.fromLTRB(this.left, this.top, this.right, this.bottom)
EdgeInsets.all(double value)
EdgeInsets.only({this.left = 0.0, this.top = 0.0, this.right = 0.0, this.bottom = 0.0})
EdgeInsets.symmetric({double vertical = 0.0, double horizontal = 0.0})
EdgeInsets copyWith({double left, double top, double right, double bottom,})
  • left: double
  • top: double
  • right: double
  • bottom: double

1.1 static const

  EdgeInsets zero = EdgeInsets.only();

1.2 get

  Offset get topLeft => Offset(left, top);
  Offset get topRight => Offset(-right, top);
  Offset get bottomLeft => Offset(left, -bottom);
  Offset get bottomRight => Offset(-right, -bottom);

2. EdgeInsetsDirectional

EdgeInsetsDirectional.fromSTEB(this.start, this.top, this.end, this.bottom);
EdgeInsetsDirectional.only({this.start = 0.0, this.top = 0.0, this.end = 0.0, this.bottom = 0.0,})
  • start: double
  • top: double
  • end: double
  • bottom: double

相关文章

  • EdgeInsetsGeometry

    abstract class (需要补充父类方法) 1. EdgeInsets left: double top:...

  • Widget--Padding

    Padding可以给其子节点添加填充。它的定义: EdgeInsetsGeometry是一个抽象类,开发中,我们一...

网友评论

      本文标题:EdgeInsetsGeometry

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