Skip to content

Commit ec79274

Browse files
committed
增加 input dialog
1 parent 73e6c28 commit ec79274

3 files changed

Lines changed: 21 additions & 5 deletions

File tree

‎lib/common/utils/CommonUtils.dart‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class CommonUtils {
103103
onTitleChanged,
104104
onContentChanged,
105105
onPressed,
106-
titleController: valueController,
106+
titleController: titleController,
107107
valueController: valueController,
108108
needTitle: needTitle,
109109
),

‎lib/page/IssueDetailPage.dart‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,27 @@ class _IssueDetailPageState extends GSYListState<IssueDetailPage> {
9090
new Container(width: 0.3, height: 30.0, color: Color(GSYColors.subLightTextColor)),
9191
new FlatButton(
9292
onPressed: () {
93-
String title = issueHeaderViewModel.issueDes;
93+
String title = issueHeaderViewModel.issueComment;
9494
String content = issueHeaderViewModel.issueDesHtml;
95-
issueInfoTitleControl = new TextEditingController();
96-
issueInfoValueControl = new TextEditingController();
95+
issueInfoTitleControl = new TextEditingController(text: title);
96+
issueInfoValueControl = new TextEditingController(text: content);
9797
//编译Issue Info
98-
CommonUtils.showEditDialog(context, GSYStrings.issue_edit_issue, (titleValue) {}, (contentValue) {}, () {}, needTitle: true);
98+
CommonUtils.showEditDialog(
99+
context,
100+
GSYStrings.issue_edit_issue,
101+
(titleValue) {
102+
title = titleValue;
103+
},
104+
(contentValue) {
105+
content = contentValue;
106+
},
107+
() {
108+
//提交
109+
},
110+
titleController: issueInfoTitleControl,
111+
valueController: issueInfoValueControl,
112+
needTitle: true,
113+
);
99114
},
100115
child: new Text(GSYStrings.issue_edit, style: GSYConstant.smallText)),
101116
new Container(width: 0.3, height: 30.0, color: Color(GSYColors.subLightTextColor)),

‎lib/widget/IssueEditDIalog.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class _IssueEditDialogState extends State<IssueEditDialog> {
8686
padding: new EdgeInsets.only(left: 20.0, top: 12.0, right: 20.0, bottom: 12.0),
8787
child: new TextField(
8888
autofocus: false,
89+
maxLines: 999,
8990
onChanged: onContentChanged,
9091
controller: valueController,
9192
decoration: new InputDecoration.collapsed(

0 commit comments

Comments
 (0)