flutter之Positioned

2020-04-14  本文已影响0人  不泯iOS

api:

const Positioned({
    Key key,
    this.left,
    this.top,
    this.right,
    this.bottom,
    this.width,
    this.height,
    @required Widget child,
  })

使用注意点:

1.在同一个方向上,只能同时使用其中的两个属性,比如水平方向上只能使用left,right,width中的两个,第三个会自动计算。
2.Positioned通常和Stack一起使用,left、top 、right、 bottom分别代表离Stack左、上、右、底四边的距离。

上一篇下一篇

猜你喜欢

热点阅读