Flutter之IndexedStack组件

/**
 *  集成自Stack,用来显示第index个child,隐藏其他的child
 *  IndexedStack({
    Key key,
    AlignmentGeometry alignment = AlignmentDirectional.topStart,
    TextDirection textDirection,
    StackFit sizing = StackFit.loose,
    this.index = 0,
    List children = const [],
    })
 */
body: IndexedStack(
            index: 2,
            alignment: Alignment.center,
            children: [
              Text("第一层"),
              Text("第二层"),
              Text("第三层"),
            ],
          )

码云地址:https://gitee.com/xgljh/Flutter.git

你可能感兴趣的:(Flutter之IndexedStack组件)