点击appBar的动作,展开下方的弹窗,再次点击动作缩小弹窗,有没有这样效果的插件推荐?

发布于 2020-08-28 10:52:56
如果你的视图是简单视图,你可以使用简单的弹出窗口,参见this教程。
如果你的视图更复杂,你必须自定义它。您需要创建Widget容器的菜单和展开部分,自定义显示,如主页。然后将其显示为对话框。
showGeneralDialog(
context: context,
barrierColor: Colors.black12.withOpacity(0.6), // background color
barrierDismissible: false, // should dialog be dismissed when tapped outside
barrierLabel: "Dialog", // label for barrier
transitionDuration: Duration(milliseconds: 400), // how long it takes to popup dialog after button click
pageBuilder: (_, __, ___) { // your widget implementation
FocusScope.of(context).requestFocus(_focusNodeCity);
return SafeArea(
child: Material(
color: Colors.transparent,
child: SizedBox.expand( // makes widget fullscreen
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
],
),
),
),
);
},
);https://stackoverflow.com/questions/63626676
复制相似问题