|
@@ -33,7 +33,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -33,7 +33,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
33
|
TextEditingController _controller = TextEditingController();
|
33
|
TextEditingController _controller = TextEditingController();
|
|
34
|
FocusNode focusNode = FocusNode();
|
34
|
FocusNode focusNode = FocusNode();
|
|
35
|
|
35
|
|
|
36
|
- int alwaysCount = 0; //常用备注数
|
36
|
+ // int alwaysCount = 0; //常用备注数
|
|
37
|
|
37
|
|
|
38
|
@override
|
38
|
@override
|
|
39
|
void initState() {
|
39
|
void initState() {
|
|
@@ -66,10 +66,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -66,10 +66,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
66
|
|
66
|
|
|
67
|
//添加常用备注
|
67
|
//添加常用备注
|
|
68
|
_addCustomRemark(Remark remark) {
|
68
|
_addCustomRemark(Remark remark) {
|
|
69
|
- if (alwaysCount >= 10) {
|
|
|
|
70
|
- Utils.showToast("最多添加10个常用备注");
|
|
|
|
71
|
- return;
|
|
|
|
72
|
- }
|
69
|
+ // if (alwaysCount >= 10) {
|
|
|
|
70
|
+ // Utils.showToast("最多添加10个常用备注");
|
|
|
|
71
|
+ // return;
|
|
|
|
72
|
+ // }
|
|
73
|
Map<String, String> params = {
|
73
|
Map<String, String> params = {
|
|
74
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
74
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
75
|
"kid": remark.id,
|
75
|
"kid": remark.id,
|
|
@@ -95,7 +95,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -95,7 +95,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
95
|
for (Remark remark in remarkManagerModel.remarks) {
|
95
|
for (Remark remark in remarkManagerModel.remarks) {
|
|
96
|
if (remark.oftenUse != null && remark.oftenUse.isNotEmpty)
|
96
|
if (remark.oftenUse != null && remark.oftenUse.isNotEmpty)
|
|
97
|
always.add(Container(
|
97
|
always.add(Container(
|
|
98
|
- height: ScreenUtil().setWidth(50),
|
98
|
+ // height: ScreenUtil().setWidth(50),
|
|
99
|
decoration: BoxDecoration(
|
99
|
decoration: BoxDecoration(
|
|
100
|
color: MyColours.color_199095,
|
100
|
color: MyColours.color_199095,
|
|
101
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
101
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
@@ -110,7 +110,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -110,7 +110,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
110
|
fontSize: ScreenUtil().setSp(30),
|
110
|
fontSize: ScreenUtil().setSp(30),
|
|
111
|
color: MyColours.color_ffffff,
|
111
|
color: MyColours.color_ffffff,
|
|
112
|
),
|
112
|
),
|
|
113
|
- overflow: TextOverflow.ellipsis,
|
113
|
+ // overflow: TextOverflow.ellipsis,
|
|
114
|
),
|
114
|
),
|
|
115
|
),
|
115
|
),
|
|
116
|
),
|
116
|
),
|
|
@@ -138,7 +138,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -138,7 +138,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
138
|
]),
|
138
|
]),
|
|
139
|
));
|
139
|
));
|
|
140
|
}
|
140
|
}
|
|
141
|
- alwaysCount = always.length;
|
141
|
+ // alwaysCount = always.length;
|
|
142
|
return always;
|
142
|
return always;
|
|
143
|
}
|
143
|
}
|
|
144
|
|
144
|
|
|
@@ -149,17 +149,17 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -149,17 +149,17 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
149
|
alls.add(
|
149
|
alls.add(
|
|
150
|
GestureDetector(
|
150
|
GestureDetector(
|
|
151
|
onTap: () {
|
151
|
onTap: () {
|
|
152
|
- if (alwaysCount >= 10) {
|
|
|
|
153
|
- Utils.showToast("最多添加10个常用备注");
|
|
|
|
154
|
- return;
|
|
|
|
155
|
- }
|
152
|
+ // if (alwaysCount >= 10) {
|
|
|
|
153
|
+ // Utils.showToast("最多添加10个常用备注");
|
|
|
|
154
|
+ // return;
|
|
|
|
155
|
+ // }
|
|
156
|
setState(() {
|
156
|
setState(() {
|
|
157
|
remark.oftenUse = remark.custom;
|
157
|
remark.oftenUse = remark.custom;
|
|
158
|
_addCustomRemark(remark);
|
158
|
_addCustomRemark(remark);
|
|
159
|
});
|
159
|
});
|
|
160
|
},
|
160
|
},
|
|
161
|
child: Container(
|
161
|
child: Container(
|
|
162
|
- height: ScreenUtil().setWidth(50),
|
162
|
+ // height: ScreenUtil().setWidth(50),
|
|
163
|
padding:
|
163
|
padding:
|
|
164
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
164
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
165
|
decoration:
|
165
|
decoration:
|
|
@@ -186,7 +186,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -186,7 +186,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
186
|
? MyColours.color_ffffff
|
186
|
? MyColours.color_ffffff
|
|
187
|
: MyColours.color_199095,
|
187
|
: MyColours.color_199095,
|
|
188
|
),
|
188
|
),
|
|
189
|
- overflow: TextOverflow.ellipsis,
|
189
|
+ // overflow: TextOverflow.ellipsis,
|
|
190
|
)),
|
190
|
)),
|
|
191
|
]),
|
191
|
]),
|
|
192
|
)),
|
192
|
)),
|
|
@@ -215,7 +215,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -215,7 +215,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
215
|
textAlignVertical: TextAlignVertical.center,
|
215
|
textAlignVertical: TextAlignVertical.center,
|
|
216
|
keyboardType: TextInputType.text,
|
216
|
keyboardType: TextInputType.text,
|
|
217
|
decoration: InputDecoration.collapsed(hintText: ""),
|
217
|
decoration: InputDecoration.collapsed(hintText: ""),
|
|
218
|
- inputFormatters: [LengthLimitingTextInputFormatter(10)],
|
218
|
+ // inputFormatters: [LengthLimitingTextInputFormatter(10)],
|
|
219
|
style: TextStyle(
|
219
|
style: TextStyle(
|
|
220
|
color: MyColours.color_353535,
|
220
|
color: MyColours.color_353535,
|
|
221
|
fontSize: ScreenUtil().setSp(30),
|
221
|
fontSize: ScreenUtil().setSp(30),
|
|
@@ -236,10 +236,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -236,10 +236,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
236
|
))
|
236
|
))
|
|
237
|
: GestureDetector(
|
237
|
: GestureDetector(
|
|
238
|
onTap: () {
|
238
|
onTap: () {
|
|
239
|
- if (remarkManagerModel.remarks.length >= 30) {
|
|
|
|
240
|
- Utils.showToast("最多添加30个备注");
|
|
|
|
241
|
- return;
|
|
|
|
242
|
- }
|
239
|
+ // if (remarkManagerModel.remarks.length >= 30) {
|
|
|
|
240
|
+ // Utils.showToast("最多添加30个备注");
|
|
|
|
241
|
+ // return;
|
|
|
|
242
|
+ // }
|
|
243
|
|
243
|
|
|
244
|
setState(() {
|
244
|
setState(() {
|
|
245
|
isAdding = true;
|
245
|
isAdding = true;
|
|
@@ -313,7 +313,8 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -313,7 +313,8 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
313
|
showMsg: "加载中,请稍后...",
|
313
|
showMsg: "加载中,请稍后...",
|
|
314
|
);
|
314
|
);
|
|
315
|
} else {
|
315
|
} else {
|
|
316
|
- return Container(
|
316
|
+ return SingleChildScrollView(
|
|
|
|
317
|
+ child: Container(
|
|
317
|
padding: EdgeInsets.symmetric(
|
318
|
padding: EdgeInsets.symmetric(
|
|
318
|
horizontal: ScreenUtil().setWidth(40)),
|
319
|
horizontal: ScreenUtil().setWidth(40)),
|
|
319
|
child: Column(
|
320
|
child: Column(
|
|
@@ -330,12 +331,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -330,12 +331,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
330
|
fontSize: ScreenUtil().setSp(30),
|
331
|
fontSize: ScreenUtil().setSp(30),
|
|
331
|
fontWeight: FontWeight.bold),
|
332
|
fontWeight: FontWeight.bold),
|
|
332
|
),
|
333
|
),
|
|
333
|
- Text(
|
|
|
|
334
|
- "(最多添加10个)",
|
|
|
|
335
|
- style: TextStyle(
|
|
|
|
336
|
- color: MyColours.color_666666,
|
|
|
|
337
|
- fontSize: ScreenUtil().setSp(26)),
|
|
|
|
338
|
- ),
|
334
|
+ // Text(
|
|
|
|
335
|
+ // "(最多添加10个)",
|
|
|
|
336
|
+ // style: TextStyle(
|
|
|
|
337
|
+ // color: MyColours.color_666666,
|
|
|
|
338
|
+ // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
339
|
+ // ),
|
|
339
|
],
|
340
|
],
|
|
340
|
),
|
341
|
),
|
|
341
|
Padding(
|
342
|
Padding(
|
|
@@ -362,12 +363,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -362,12 +363,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
362
|
fontSize: ScreenUtil().setSp(30),
|
363
|
fontSize: ScreenUtil().setSp(30),
|
|
363
|
fontWeight: FontWeight.bold),
|
364
|
fontWeight: FontWeight.bold),
|
|
364
|
),
|
365
|
),
|
|
365
|
- Text(
|
|
|
|
366
|
- "(最多添加30个)",
|
|
|
|
367
|
- style: TextStyle(
|
|
|
|
368
|
- color: MyColours.color_666666,
|
|
|
|
369
|
- fontSize: ScreenUtil().setSp(26)),
|
|
|
|
370
|
- ),
|
366
|
+ // Text(
|
|
|
|
367
|
+ // "(最多添加30个)",
|
|
|
|
368
|
+ // style: TextStyle(
|
|
|
|
369
|
+ // color: MyColours.color_666666,
|
|
|
|
370
|
+ // fontSize: ScreenUtil().setSp(26)),
|
|
|
|
371
|
+ // ),
|
|
371
|
],
|
372
|
],
|
|
372
|
),
|
373
|
),
|
|
373
|
Padding(
|
374
|
Padding(
|
|
@@ -380,7 +381,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
@@ -380,7 +381,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
380
|
)
|
381
|
)
|
|
381
|
],
|
382
|
],
|
|
382
|
),
|
383
|
),
|
|
383
|
- );
|
384
|
+ ));
|
|
384
|
}
|
385
|
}
|
|
385
|
},
|
386
|
},
|
|
386
|
),
|
387
|
),
|