Bladeren bron

修改图片问题

iOS_cz 4 jaren geleden
bovenliggende
commit
796cd46610
1 gewijzigde bestanden met toevoegingen van 20 en 20 verwijderingen
  1. 20 20
      lib/internal/maintenance/page/maintenance_submit_page.dart

+ 20 - 20
lib/internal/maintenance/page/maintenance_submit_page.dart

@@ -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 {