|
...
|
...
|
@@ -33,7 +33,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
TextEditingController _controller = TextEditingController();
|
|
|
|
FocusNode focusNode = FocusNode();
|
|
|
|
|
|
|
|
int alwaysCount = 0; //常用备注数
|
|
|
|
// int alwaysCount = 0; //常用备注数
|
|
|
|
|
|
|
|
@override
|
|
|
|
void initState() {
|
|
...
|
...
|
@@ -66,10 +66,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
|
|
|
|
//添加常用备注
|
|
|
|
_addCustomRemark(Remark remark) {
|
|
|
|
if (alwaysCount >= 10) {
|
|
|
|
Utils.showToast("最多添加10个常用备注");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// if (alwaysCount >= 10) {
|
|
|
|
// Utils.showToast("最多添加10个常用备注");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
Map<String, String> params = {
|
|
|
|
"uid": Provider.of<UserModel>(context, listen: false).user.openid,
|
|
|
|
"kid": remark.id,
|
|
...
|
...
|
@@ -95,7 +95,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
for (Remark remark in remarkManagerModel.remarks) {
|
|
|
|
if (remark.oftenUse != null && remark.oftenUse.isNotEmpty)
|
|
|
|
always.add(Container(
|
|
|
|
height: ScreenUtil().setWidth(50),
|
|
|
|
// height: ScreenUtil().setWidth(50),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
...
|
...
|
@@ -110,7 +110,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
...
|
...
|
@@ -138,7 +138,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
]),
|
|
|
|
));
|
|
|
|
}
|
|
|
|
alwaysCount = always.length;
|
|
|
|
// alwaysCount = always.length;
|
|
|
|
return always;
|
|
|
|
}
|
|
|
|
|
|
...
|
...
|
@@ -149,17 +149,17 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
alls.add(
|
|
|
|
GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
if (alwaysCount >= 10) {
|
|
|
|
Utils.showToast("最多添加10个常用备注");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// if (alwaysCount >= 10) {
|
|
|
|
// Utils.showToast("最多添加10个常用备注");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
setState(() {
|
|
|
|
remark.oftenUse = remark.custom;
|
|
|
|
_addCustomRemark(remark);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(50),
|
|
|
|
// height: ScreenUtil().setWidth(50),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
decoration:
|
|
...
|
...
|
@@ -186,7 +186,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_199095,
|
|
|
|
),
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
)),
|
|
|
|
]),
|
|
|
|
)),
|
|
...
|
...
|
@@ -215,7 +215,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
textAlignVertical: TextAlignVertical.center,
|
|
|
|
keyboardType: TextInputType.text,
|
|
|
|
decoration: InputDecoration.collapsed(hintText: ""),
|
|
|
|
inputFormatters: [LengthLimitingTextInputFormatter(10)],
|
|
|
|
// inputFormatters: [LengthLimitingTextInputFormatter(10)],
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_353535,
|
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
...
|
...
|
@@ -236,10 +236,10 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
))
|
|
|
|
: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
if (remarkManagerModel.remarks.length >= 30) {
|
|
|
|
Utils.showToast("最多添加30个备注");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// if (remarkManagerModel.remarks.length >= 30) {
|
|
|
|
// Utils.showToast("最多添加30个备注");
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
isAdding = true;
|
|
...
|
...
|
@@ -313,7 +313,8 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
showMsg: "加载中,请稍后...",
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
return Container(
|
|
|
|
return SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
...
|
...
|
@@ -330,12 +331,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"(最多添加10个)",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_666666,
|
|
|
|
fontSize: ScreenUtil().setSp(26)),
|
|
|
|
),
|
|
|
|
// Text(
|
|
|
|
// "(最多添加10个)",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_666666,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Padding(
|
|
...
|
...
|
@@ -362,12 +363,12 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
fontSize: ScreenUtil().setSp(30),
|
|
|
|
fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"(最多添加30个)",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_666666,
|
|
|
|
fontSize: ScreenUtil().setSp(26)),
|
|
|
|
),
|
|
|
|
// Text(
|
|
|
|
// "(最多添加30个)",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_666666,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// ),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Padding(
|
|
...
|
...
|
@@ -380,7 +381,7 @@ class RemarkManagerPageState extends State<RemarkManagerPage> { |
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
));
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
...
|
...
|
|