【发布时间】:2019-01-01 06:40:24
【问题描述】:
我正在使用导航抽屉,在其中我设计了一个屏幕名称作为 PostProperty 屏幕,其中实现了多个文本表单字段、图像上传,我想要的是当用户单击提交/添加按钮时,然后是当前屏幕小部件应该重绘或所有表单字段都应该清晰,以便用户可以提交/添加另一个,请指导我,如何实现这一点。
小部件构建代码
@override
Widget build(BuildContext context) {
return new Scaffold(
key: scaffoldKey,
resizeToAvoidBottomPadding: false,
backgroundColor: Colors.white,
appBar: showAppbar
? AppBar(
title: new Text(
setAppBarTitle(val_property_type),
style:
TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
),
centerTitle: true,
backgroundColor: ColorConstant.bg_color,
)
: null,
body: ModalProgressHUD(
inAsyncCall: _isInAsyncCall,
child: buildPropertyForm(context),
opacity: 0.5,
progressIndicator: CircularProgressIndicator(),
),
);
}
buildPropertyForm 是我包含所有文本表单字段和其他内容的表单。
请看下面的截图
【问题讨论】:
标签: dart flutter flutter-layout