【发布时间】:2019-10-19 09:45:59
【问题描述】:
我正在使用 Flutter for web 来制作网站。我需要制作前景滚动,但背景不像普通网站那样滚动。例如:codemagic.io。
我不能使用脚手架背景,因为我想使用 CustomPainter 自定义背景。
我尝试使用Stack,但问题是我需要ScrollView 中的Center 小部件,如果我这样做,那么CustomPainter 不会从页面顶部开始:
Stack(
children: <Widget>[
Center(
child: SingleChildScrollView(
child:
Stack(children: <Widget>[
CustomPaintWidget(),
Widgets(),
],),
有人知道解决办法吗?
谢谢!
【问题讨论】:
标签: flutter dart flutter-layout flutter-web