flutter 叠加布局Stack,Positioned超出部分

2022-03-09  本文已影响0人  天国镜

层叠布局,子组件可以根据距父容器四个角的位置来确定自身的位置
Stack允许子组件堆叠,而Positioned用于根据Stack的四个角来确定子组件的位置。

Stack

Stack({
    Key key,
    this.alignment = AlignmentDirectional.topStart,
    this.textDirection,
    this.fit = StackFit.loose,
    this.overflow = Overflow.clip,
    this.clipBehavior = Clip.hardEdge,
    List<Widget> children = const <Widget>[],
  })

属性说明

上一篇 下一篇

猜你喜欢

热点阅读