|
@@ -92,26 +92,26 @@ class MaintenanceSubmitPageState extends State<MaintenanceSubmitPage>
|
|
|
|
|
|
///选择图片
|
|
|
void selectPicker() {
|
|
|
- _getImage(2);
|
|
|
-// showDialog(
|
|
|
-// context: context,
|
|
|
-// builder: (BuildContext context) {
|
|
|
-// return SimpleDialog(
|
|
|
-// title: Text("选择方式"),
|
|
|
-// children: ["拍照", '从手机相册选择'].map((String value) {
|
|
|
-// print("$value");
|
|
|
-// return SimpleDialogOption(
|
|
|
-// child: Text(
|
|
|
-// "${value}",
|
|
|
-// style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
|
|
-// ),
|
|
|
-// onPressed: () {
|
|
|
-// _getImage(value == '拍照' ? 1 : 0);
|
|
|
-// Navigator.of(context).pop();
|
|
|
-// },
|
|
|
-// );
|
|
|
-// }).toList());
|
|
|
-// });
|
|
|
+ // _getImage(2);
|
|
|
+ showDialog(
|
|
|
+ context: context,
|
|
|
+ builder: (BuildContext context) {
|
|
|
+ return SimpleDialog(
|
|
|
+ title: Text("选择方式"),
|
|
|
+ children: ["拍照", '从手机相册选择'].map((String value) {
|
|
|
+ print("$value");
|
|
|
+ return SimpleDialogOption(
|
|
|
+ child: Text(
|
|
|
+ "${value}",
|
|
|
+ style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
|
|
|
+ ),
|
|
|
+ onPressed: () {
|
|
|
+ _getImage(value == '拍照' ? 1 : 0);
|
|
|
+ Navigator.of(context).pop();
|
|
|
+ },
|
|
|
+ );
|
|
|
+ }).toList());
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
void _getImage(int key) async {
|