批量修改图片cover->fill
							parent
							
								
									a5a8a7ef34
								
							
						
					
					
						commit
						377500c125
					
				|  | @ -156,14 +156,14 @@ class ListItemFactory { | ||||||
|                   url, |                   url, | ||||||
|                   height: imageHeight, |                   height: imageHeight, | ||||||
|                   width: imageHeight * 3 / 2, |                   width: imageHeight * 3 / 2, | ||||||
|                   fit: BoxFit.cover, |                   fit: BoxFit.fill, | ||||||
|                 ); |                 ); | ||||||
|               } else { |               } else { | ||||||
|                 img = Image.asset( |                 img = Image.asset( | ||||||
|                   url, |                   url, | ||||||
|                   height: imageHeight, |                   height: imageHeight, | ||||||
|                   width: imageHeight * 3 / 2, |                   width: imageHeight * 3 / 2, | ||||||
|                   fit: BoxFit.cover, |                   fit: BoxFit.fill, | ||||||
|                 ); |                 ); | ||||||
|               } |               } | ||||||
|               return GestureDetector( |               return GestureDetector( | ||||||
|  |  | ||||||
|  | @ -94,6 +94,8 @@ class _PromisePageState extends State<PromisePage> { | ||||||
|       context, |       context, | ||||||
|       MaterialPageRoute(builder: (c) => MineSignPage()), |       MaterialPageRoute(builder: (c) => MineSignPage()), | ||||||
|     ); |     ); | ||||||
|  |     await NativeOrientation.setPortrait(); | ||||||
|  | 
 | ||||||
|     if (path != null) { |     if (path != null) { | ||||||
|       setState(() { |       setState(() { | ||||||
|         info['FILEPATH'] = path; |         info['FILEPATH'] = path; | ||||||
|  | @ -197,14 +199,14 @@ class _PromisePageState extends State<PromisePage> { | ||||||
|         (baseImgPath ?? '') + signImagePath, |         (baseImgPath ?? '') + signImagePath, | ||||||
|         width: 100, |         width: 100, | ||||||
|         height: 50, |         height: 50, | ||||||
|         fit: BoxFit.cover, |         fit: BoxFit.fill, | ||||||
|       ); |       ); | ||||||
|     } else if (signImagePath.isNotEmpty && File(signImagePath).existsSync()) { |     } else if (signImagePath.isNotEmpty && File(signImagePath).existsSync()) { | ||||||
|       signPreview = Image.file( |       signPreview = Image.file( | ||||||
|         File(signImagePath), |         File(signImagePath), | ||||||
|         width: 100, |         width: 100, | ||||||
|         height: 50, |         height: 50, | ||||||
|         fit: BoxFit.cover, |         fit: BoxFit.fill, | ||||||
|       ); |       ); | ||||||
|     } else { |     } else { | ||||||
|       signPreview = const SizedBox.shrink(); |       signPreview = const SizedBox.shrink(); | ||||||
|  |  | ||||||
|  | @ -201,18 +201,19 @@ class _HomePageState extends State<HomePage> { | ||||||
|     final corppromiseData = await ApiService.checkSafeCorppromise(); |     final corppromiseData = await ApiService.checkSafeCorppromise(); | ||||||
|     if (corppromiseData['ISSIGN'] == 1) { |     if (corppromiseData['ISSIGN'] == 1) { | ||||||
|       // 承诺 |       // 承诺 | ||||||
|       CustomAlertDialog.showConfirm( |       final confirmed = await CustomAlertDialog.showConfirm( | ||||||
|         context, |         context, | ||||||
|         title: '温馨提示', |         title: '温馨提示', | ||||||
|         content: '有未签署的安全承诺,点击确认前往签署', |         content: '有未签署的安全承诺,点击确认前往签署', | ||||||
|         force: true, |         force: true, | ||||||
|         onConfirm: () { | 
 | ||||||
|           Navigator.pushReplacement( |  | ||||||
|             context, |  | ||||||
|             MaterialPageRoute(builder: (_) => const PromisePage()), |  | ||||||
|           ); |  | ||||||
|         }, |  | ||||||
|       ); |       ); | ||||||
|  |       if (confirmed) { | ||||||
|  |         Navigator.pushReplacement( | ||||||
|  |           context, | ||||||
|  |           MaterialPageRoute(builder: (_) => const PromisePage()), | ||||||
|  |         ); | ||||||
|  |       } | ||||||
|       return; |       return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -255,7 +255,7 @@ class _StudyDetailPageState extends State<StudyDetailPage> | ||||||
|   void _onTimeUpdate() { |   void _onTimeUpdate() { | ||||||
|     if (_videoController == null || !_videoController!.value.isPlaying) return; |     if (_videoController == null || !_videoController!.value.isPlaying) return; | ||||||
|     final curr = _videoController!.value.position; |     final curr = _videoController!.value.position; | ||||||
|     if (!_throttleFlag && (curr - _lastReported).inSeconds >= 5) { |     if (!_throttleFlag && (curr - _lastReported).inSeconds >= 0) { | ||||||
|       _throttleFlag = true; |       _throttleFlag = true; | ||||||
|       _lastReported = curr; |       _lastReported = curr; | ||||||
|       _submitPlayTime( |       _submitPlayTime( | ||||||
|  |  | ||||||
|  | @ -704,7 +704,7 @@ class ItemListWidget { | ||||||
|                       '${ApiService.baseImgPath}${imageUrls![index] ?? ''}', |                       '${ApiService.baseImgPath}${imageUrls![index] ?? ''}', | ||||||
|                       width: 80,  // 图片宽度 |                       width: 80,  // 图片宽度 | ||||||
|                       height: 80, // 图片高度 |                       height: 80, // 图片高度 | ||||||
|                       fit: BoxFit.cover, |                       fit: BoxFit.fill, | ||||||
|                       loadingBuilder: (context, child, loadingProgress) { |                       loadingBuilder: (context, child, loadingProgress) { | ||||||
|                         if (loadingProgress == null) return child; |                         if (loadingProgress == null) return child; | ||||||
|                         return Container( |                         return Container( | ||||||
|  |  | ||||||
|  | @ -420,7 +420,7 @@ class OtherMeasuresWidget extends StatelessWidget { | ||||||
|                 '$baseImgPath$path', |                 '$baseImgPath$path', | ||||||
|                 width: 60, |                 width: 60, | ||||||
|                 height: 60, |                 height: 60, | ||||||
|                 fit: BoxFit.cover, |                 fit: BoxFit.fill, | ||||||
|                 errorBuilder: (_, __, ___) => const Icon(Icons.broken_image), |                 errorBuilder: (_, __, ___) => const Icon(Icons.broken_image), | ||||||
|               ), |               ), | ||||||
|             ), |             ), | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -109,7 +109,7 @@ class _HotworkGasListState extends State<HotworkGasList> { | ||||||
|                           img, |                           img, | ||||||
|                           width: 50, |                           width: 50, | ||||||
|                           height: 30, |                           height: 30, | ||||||
|                           fit: BoxFit.cover, |                           fit: BoxFit.fill, | ||||||
|                         ), |                         ), | ||||||
|                       ); |                       ); | ||||||
|                     }), |                     }), | ||||||
|  |  | ||||||
|  | @ -163,7 +163,7 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -203,7 +203,7 @@ class _CutroadDetailFormWidgetState extends State<CutroadDetailFormWidget> { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -134,7 +134,7 @@ class CutroadFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -174,7 +174,7 @@ class CutroadFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -170,7 +170,7 @@ class _BreakgroundDetailFormWidgetState | ||||||
|                                           fullUrl, |                                           fullUrl, | ||||||
|                                           width: 50, |                                           width: 50, | ||||||
|                                           height: 50, |                                           height: 50, | ||||||
|                                           fit: BoxFit.cover, |                                           fit: BoxFit.fill, | ||||||
|                                           errorBuilder: |                                           errorBuilder: | ||||||
|                                               (_, __, ___) => const Icon( |                                               (_, __, ___) => const Icon( | ||||||
|                                                 Icons.broken_image, |                                                 Icons.broken_image, | ||||||
|  | @ -214,7 +214,7 @@ class _BreakgroundDetailFormWidgetState | ||||||
|                                           fullUrl, |                                           fullUrl, | ||||||
|                                           width: imageWidth, |                                           width: imageWidth, | ||||||
|                                           height: imageHeight, |                                           height: imageHeight, | ||||||
|                                           fit: BoxFit.cover, |                                           fit: BoxFit.fill, | ||||||
|                                           errorBuilder: |                                           errorBuilder: | ||||||
|                                               (_, __, ___) => const Icon( |                                               (_, __, ___) => const Icon( | ||||||
|                                                 Icons.broken_image, |                                                 Icons.broken_image, | ||||||
|  | @ -349,7 +349,7 @@ class _BreakgroundDetailFormWidgetState | ||||||
|                     onTap: () { |                     onTap: () { | ||||||
|                       presentOpaque(SingleImageViewer(imageUrl: fullUrl), context); |                       presentOpaque(SingleImageViewer(imageUrl: fullUrl), context); | ||||||
|                     }, |                     }, | ||||||
|                     child: Image.network(fullUrl, fit: BoxFit.cover), |                     child: Image.network(fullUrl, fit: BoxFit.fill), | ||||||
|                   ), |                   ), | ||||||
|                 ); |                 ); | ||||||
|               }), |               }), | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -165,7 +165,7 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -205,7 +205,7 @@ class _HoistworkDetailFormWidgetState extends State<HoistWorkDetailFormWidget> { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -134,7 +134,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -174,7 +174,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -134,7 +134,7 @@ class HighWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -174,7 +174,7 @@ class HighWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -110,7 +110,7 @@ class _ElectricityGasListState extends State<ElectricityGasList> { | ||||||
|                           img, |                           img, | ||||||
|                           width: 50, |                           width: 50, | ||||||
|                           height: 30, |                           height: 30, | ||||||
|                           fit: BoxFit.cover, |                           fit: BoxFit.fill, | ||||||
|                         ), |                         ), | ||||||
|                       ); |                       ); | ||||||
|                     }), |                     }), | ||||||
|  |  | ||||||
|  | @ -137,7 +137,7 @@ class BlindboardFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -177,7 +177,7 @@ class BlindboardFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                   fullUrl, |                                   fullUrl, | ||||||
|                                   width: 50, |                                   width: 50, | ||||||
|                                   height: 50, |                                   height: 50, | ||||||
|                                   fit: BoxFit.cover, |                                   fit: BoxFit.fill, | ||||||
|                                   errorBuilder: (_, __, ___) => const Icon( |                                   errorBuilder: (_, __, ___) => const Icon( | ||||||
|                                     Icons.broken_image, |                                     Icons.broken_image, | ||||||
|                                     size: 40, |                                     size: 40, | ||||||
|  | @ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { | ||||||
|                                       fullUrl, |                                       fullUrl, | ||||||
|                                       width: imageWidth, |                                       width: imageWidth, | ||||||
|                                       height: imageHeight, |                                       height: imageHeight, | ||||||
|                                       fit: BoxFit.cover, |                                       fit: BoxFit.fill, | ||||||
|                                       errorBuilder: (_, __, ___) => |                                       errorBuilder: (_, __, ___) => | ||||||
|                                       const Icon(Icons.broken_image, size: 60), |                                       const Icon(Icons.broken_image, size: 60), | ||||||
|                                     ), |                                     ), | ||||||
|  |  | ||||||
|  | @ -111,7 +111,7 @@ class _SpaceworkGasListState extends State<SpaceworkGasList> { | ||||||
|                           img, |                           img, | ||||||
|                           width: 50, |                           width: 50, | ||||||
|                           height: 30, |                           height: 30, | ||||||
|                           fit: BoxFit.cover, |                           fit: BoxFit.fill, | ||||||
|                         ), |                         ), | ||||||
|                       ); |                       ); | ||||||
|                     }), |                     }), | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue