|
|
|
@ -12,6 +12,8 @@ class EditRemarksPage extends StatefulWidget {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class _EditRemarksPage extends State<EditRemarksPage> { |
|
|
|
|
TextEditingController commentTextController = TextEditingController(); |
|
|
|
|
|
|
|
|
|
@override |
|
|
|
|
Widget build(BuildContext context) { |
|
|
|
|
return Scaffold( |
|
|
|
@ -65,6 +67,9 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
child: TextField( |
|
|
|
|
controller: commentTextController, |
|
|
|
|
keyboardType: TextInputType.multiline, |
|
|
|
|
maxLines: 10, |
|
|
|
|
decoration: InputDecoration( |
|
|
|
|
isDense: true, |
|
|
|
|
hintText: '请填写备注信息,例如:面包切一刀', |
|
|
|
@ -85,7 +90,11 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
), |
|
|
|
|
flex: 1, |
|
|
|
|
), |
|
|
|
|
Container( |
|
|
|
|
GestureDetector( |
|
|
|
|
onTap: (){ |
|
|
|
|
Navigator.pop(context,commentTextController.text); |
|
|
|
|
}, |
|
|
|
|
child: Container( |
|
|
|
|
padding: EdgeInsets.all(16.h), |
|
|
|
|
width: MediaQuery.of(context).size.width, |
|
|
|
|
alignment: Alignment.center, |
|
|
|
@ -99,13 +108,21 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
], |
|
|
|
|
), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
addRemarksCnt(cnt){ |
|
|
|
|
setState(() { |
|
|
|
|
commentTextController.text = commentTextController.text + cnt; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
List<Widget> remarks() { |
|
|
|
|
return [ |
|
|
|
|
GestureDetector(child: |
|
|
|
|
Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -119,7 +136,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),onTap: (){addRemarksCnt("面包");},), |
|
|
|
|
GestureDetector(child: |
|
|
|
|
Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -133,7 +151,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),onTap: (){addRemarksCnt("面包要切好");},), |
|
|
|
|
GestureDetector(child: |
|
|
|
|
Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -147,7 +166,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),onTap: (){addRemarksCnt("一点");},), |
|
|
|
|
GestureDetector(child: |
|
|
|
|
Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -161,7 +181,8 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),onTap: (){addRemarksCnt("点");},), |
|
|
|
|
GestureDetector(child: |
|
|
|
|
Container( |
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 6.h, horizontal: 22.w), |
|
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -175,7 +196,7 @@ class _EditRemarksPage extends State<EditRemarksPage> {
|
|
|
|
|
fontSize: 12.sp, |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
), |
|
|
|
|
),onTap: (){addRemarksCnt("点");},), |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|