Skip to content

Commit 092eb58

Browse files
committed
修复反馈和issue输入框底部被挡住问题。
fix #224
1 parent 6ee54a3 commit 092eb58

File tree

1 file changed

+89
-87
lines changed

1 file changed

+89
-87
lines changed

lib/widget/IssueEditDIalog.dart

Lines changed: 89 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -82,99 +82,101 @@ class _IssueEditDialogState extends State<IssueEditDialog> {
8282

8383
@override
8484
Widget build(BuildContext context) {
85-
return new Container(
86-
height: MediaQuery.of(context).size.height,
87-
width: MediaQuery.of(context).size.width,
88-
color: Colors.black12,
89-
90-
///触摸收起键盘
91-
child: new GestureDetector(
92-
behavior: HitTestBehavior.translucent,
93-
onTap: () {
94-
FocusScope.of(context).requestFocus(new FocusNode());
95-
},
96-
child: new Center(
97-
child: new GSYCardItem(
98-
margin: EdgeInsets.all(50.0),
99-
shape: new RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))),
100-
child: new Padding(
101-
padding: new EdgeInsets.all(12.0),
102-
child: new Column(
103-
mainAxisSize: MainAxisSize.min,
104-
children: <Widget>[
105-
///dialog标题
106-
new Padding(
107-
padding: new EdgeInsets.only(top: 5.0, bottom: 15.0),
108-
child: new Center(
109-
child: new Text(widget.dialogTitle, style: GSYConstant.normalTextBold),
110-
)),
111-
112-
///标题输入框
113-
renderTitleInput(),
114-
115-
///内容输入框
116-
new Container(
117-
height: MediaQuery.of(context).size.width * 3 / 4,
118-
decoration: new BoxDecoration(
119-
borderRadius: BorderRadius.all(Radius.circular(4.0)),
120-
color: Color(GSYColors.white),
121-
border: new Border.all(color: Color(GSYColors.subTextColor), width: .3),
122-
),
123-
padding: new EdgeInsets.only(left: 20.0, top: 12.0, right: 20.0, bottom: 12.0),
124-
child: new Column(
125-
children: <Widget>[
126-
new Expanded(
127-
child: new TextField(
128-
autofocus: false,
129-
maxLines: 999,
130-
onChanged: widget.onContentChanged,
131-
controller: widget.valueController,
132-
decoration: new InputDecoration.collapsed(
133-
hintText: CommonUtils.getLocale(context).issue_edit_issue_title_tip,
134-
hintStyle: GSYConstant.middleSubText,
135-
),
136-
style: GSYConstant.middleText,
137-
),
85+
return new Scaffold(
86+
backgroundColor: Colors.transparent,
87+
body: new Container(
88+
height: MediaQuery.of(context).size.height,
89+
width: MediaQuery.of(context).size.width,
90+
color: Colors.black12,
91+
///触摸收起键盘
92+
child: new GestureDetector(
93+
behavior: HitTestBehavior.translucent,
94+
onTap: () {
95+
FocusScope.of(context).requestFocus(new FocusNode());
96+
},
97+
child: new Center(
98+
child: new GSYCardItem(
99+
margin: EdgeInsets.only(left:50.0, right: 50.0),
100+
shape: new RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))),
101+
child: new Padding(
102+
padding: new EdgeInsets.all(12.0),
103+
child: new Column(
104+
mainAxisSize: MainAxisSize.min,
105+
children: <Widget>[
106+
///dialog标题
107+
new Padding(
108+
padding: new EdgeInsets.only(top: 5.0, bottom: 15.0),
109+
child: new Center(
110+
child: new Text(widget.dialogTitle, style: GSYConstant.normalTextBold),
111+
)),
112+
113+
///标题输入框
114+
renderTitleInput(),
115+
116+
///内容输入框
117+
new Container(
118+
height: MediaQuery.of(context).size.width * 3 / 4,
119+
decoration: new BoxDecoration(
120+
borderRadius: BorderRadius.all(Radius.circular(4.0)),
121+
color: Color(GSYColors.white),
122+
border: new Border.all(color: Color(GSYColors.subTextColor), width: .3),
138123
),
124+
padding: new EdgeInsets.only(left: 20.0, top: 12.0, right: 20.0, bottom: 12.0),
125+
child: new Column(
126+
children: <Widget>[
127+
new Expanded(
128+
child: new TextField(
129+
autofocus: false,
130+
maxLines: 999,
131+
onChanged: widget.onContentChanged,
132+
controller: widget.valueController,
133+
decoration: new InputDecoration.collapsed(
134+
hintText: CommonUtils.getLocale(context).issue_edit_issue_title_tip,
135+
hintStyle: GSYConstant.middleSubText,
136+
),
137+
style: GSYConstant.middleText,
138+
),
139+
),
139140

140-
///快速输入框
141-
_renderFastInputContainer(),
142-
],
143-
),
144-
),
145-
new Container(height: 10.0),
146-
new Row(
147-
crossAxisAlignment: CrossAxisAlignment.center,
148-
children: <Widget>[
149-
///取消
150-
new Expanded(
151-
child: new RawMaterialButton(
152-
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
153-
padding: EdgeInsets.all(4.0),
154-
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
155-
child: new Text(CommonUtils.getLocale(context).app_cancel, style: GSYConstant.normalSubText),
156-
onPressed: () {
157-
Navigator.pop(context);
158-
})),
159-
new Container(width: 0.3, height: 25.0, color: Color(GSYColors.subTextColor)),
160-
161-
///确定
162-
new Expanded(
163-
child: new RawMaterialButton(
164-
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
165-
padding: EdgeInsets.all(4.0),
166-
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
167-
child: new Text(CommonUtils.getLocale(context).app_ok, style: GSYConstant.normalTextBold),
168-
onPressed: widget.onPressed)),
141+
///快速输入框
142+
_renderFastInputContainer(),
143+
],
144+
),
145+
),
146+
new Container(height: 10.0),
147+
new Row(
148+
crossAxisAlignment: CrossAxisAlignment.center,
149+
children: <Widget>[
150+
///取消
151+
new Expanded(
152+
child: new RawMaterialButton(
153+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
154+
padding: EdgeInsets.all(4.0),
155+
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
156+
child: new Text(CommonUtils.getLocale(context).app_cancel, style: GSYConstant.normalSubText),
157+
onPressed: () {
158+
Navigator.pop(context);
159+
})),
160+
new Container(width: 0.3, height: 25.0, color: Color(GSYColors.subTextColor)),
161+
162+
///确定
163+
new Expanded(
164+
child: new RawMaterialButton(
165+
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
166+
padding: EdgeInsets.all(4.0),
167+
constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0),
168+
child: new Text(CommonUtils.getLocale(context).app_ok, style: GSYConstant.normalTextBold),
169+
onPressed: widget.onPressed)),
170+
],
171+
)
169172
],
170-
)
171-
],
173+
),
174+
),
172175
),
173176
),
174177
),
175-
),
176-
),
177-
);
178+
)
179+
);
178180
}
179181
}
180182

0 commit comments

Comments
 (0)