我是颤振飞镖语言的新手,想知道如何使页面滚动。这是我要滚动的代码页面之一:
class Second extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DraggableScrollableSheet(
builder: (context, scrollController) {
return SingleChildScrollView(
controller: scrollController,
child: Scaffold(
backgroundColor: const Color(0xffffffff),
body: Stack(
children: <Widget>[
Transform.translate(
offset: Offset(30.0, 296.0),
child:
Container(
width: 315.0,
height: 287.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(37.0),
image: DecorationImage(
image: const AssetImage('assets/images/right.png'),
fit: BoxFit.fill,
)
),
),
),
],
),
),
);
}
);
}
}
请注意,这不是完整的代码,因为代码很长。我尝试使用 Draggable Scrollable Sheet,当我运行代码时,我只能看到一个黑屏。有人能帮我吗?提前致谢 :)