如何在flutter中添加可滚动的堆栈内部小部件?

时间:2020-07-15 14:40:09

标签: flutter flutter-layout

如何在堆栈中添加可滚动小部件?

Widget build(BuildContext context) {
final children = [
  if (!widget.closeManually) _renderOverlay(),
  _renderButton(),
];

return Stack(
  alignment: Alignment.bottomRight,
  fit: StackFit.expand,
  overflow: Overflow.visible,
  children: children,
);

}

_renderOverlay()和_renderButton()是定位的小部件。

0 个答案:

没有答案