And*_*rin 6 flutter flutter-animation
我有一个应用程序,我想添加页面,从下到上滑动,直到屏幕的四分之三,如图所示
如果你按箭头,它会再次返回。
正如您所看到的,一旦您按下食物系统,四分之三页面就会弹出。我已经准备好了时钟和所有功能,但我只是不知道按下它后该使用什么。
Sae*_*kri 10
您可以使用“showModalBottomSheet”小部件。更多信息
showModalBottomSheet(
context: context,
builder: (builder) {
return childWidget;
},
Run Code Online (Sandbox Code Playgroud)
对于 3/4 的屏幕高度,您可以设置如下:
double mWidth = MediaQuery.of(context).size.width;
double mHeight = MediaQuery.of(context).size.height;
Widget childWidget(){
return Container {
width: mWidth,
height: mHeight * 0.75,
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7627 次 |
| 最近记录: |