我正在开发一个Flutter应用程序。在其中,我创建了一个SliverAppBar:
child: NestedScrollView (
headerSliverBuilder: (BuildContext context, i) {
return <Widget> [
SliverAppBar (
backgroundColor: Colors.black,
expandedHeight: 150.0,
)
];
},
我将高度设置为150.0像素。但是我意识到这个尺寸在不同的设备上会改变。如何使尺寸在每个设备上占据屏幕的40%?