EdgeInsetsGeometry

2020-02-05  本文已影响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,})

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,})
上一篇 下一篇

猜你喜欢

热点阅读