1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//
// opinion
//
// gmalpha_flutter
// Created by Mikasa on 2019/2/19.
// Copyright © 2019 Gengmei. All rights reserved.
// 意见与建议页面
import 'package:dio/dio.dart';
import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter/material.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseComponent.dart';
import 'package:gmalpha_flutter/commonModel/base/BasePage.dart';
import 'package:gmalpha_flutter/commonModel/base/BaseUtil.dart';
import 'package:gmalpha_flutter/res/value/ALColors.dart';
import 'package:gmalpha_flutter/userModel/page/comment/CommentModel.dart';
class CommentSuggestPage extends StatefulWidget {
var _model;
CommentSuggestPage(String refer) {
_model = CommentModel(refer);
}
@override
State<StatefulWidget> createState() => _CommentSuggestPageState(_model);
}
class _CommentSuggestPageState extends BasePage<CommentSuggestPage> {
TextEditingController opinionCtrl = TextEditingController();
TextEditingController telCtrl = TextEditingController();
CommentModel _model;
_CommentSuggestPageState(this._model);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: baseAppBar(
title: '意见与建议',
backClick: () {
Navigator.pop(context);
}),
body: new SingleChildScrollView(
child: Center(
child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
children: <Widget>[
Container(
alignment: Alignment.topCenter,
margin:
EdgeInsets.only(left: 30, top: 50, right: 30, bottom: 0),
height: 215,
decoration: BoxDecoration(
border: Border.all(color: ALColors.ColorC4C4C4, width: 1),
),
child: TextField(
maxLines: 10,
controller: opinionCtrl,
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.all(10),
hintText: '意见与建议',
hintStyle: TextStyle(
color: ALColors.ColorC4C4C4,
fontSize: 14,
),
labelStyle:
TextStyle(color: ALColors.Color323232, fontSize: 19),
),
),
),
Container(
height: 30,
margin: EdgeInsets.only(left: 30, right: 30, top: 40),
// padding: EdgeInsets.only(bottom: 10),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: ALColors.ColorC4C4C4),
)),
alignment: Alignment.centerLeft,
child: TextField(
controller: telCtrl,
decoration: InputDecoration(
border: InputBorder.none,
contentPadding: EdgeInsets.all(10),
hintText: '联系方式',
hintStyle: TextStyle(
color: ALColors.ColorC4C4C4,
fontSize: 14,
),
labelStyle:
TextStyle(color: ALColors.Color323232, fontSize: 19),
),
),
),
Container(
alignment: Alignment.bottomCenter,
decoration: BoxDecoration(
border:
Border.all(color: ALColors.Color323232, width: 1.5)),
margin: EdgeInsets.only(
left: 30, right: 30, bottom: 30, top: 180),
// padding: EdgeInsets.all(0),
constraints:
BoxConstraints(minWidth: screenWidth, minHeight: 45),
child: FlatButton(
onPressed: () {
_model.confirmClick(
context, opinionCtrl.text ?? "", telCtrl.text ?? "");
},
child: Text(
'提交',
style:
TextStyle(fontSize: 14, color: ALColors.Color323232),
),
),
),
],
),
),
));
}
@override
void dispose() {
super.dispose();
opinionCtrl.dispose();
telCtrl.dispose();
}
@override
String pageName() {
return "comment_arguement";
}
@override
String referrer() {
return _model.refer;
}
}