diff --git a/lib/customWidget/ItemWidgetFactory.dart b/lib/customWidget/ItemWidgetFactory.dart index 09b1028..ae767f5 100644 --- a/lib/customWidget/ItemWidgetFactory.dart +++ b/lib/customWidget/ItemWidgetFactory.dart @@ -156,14 +156,14 @@ class ListItemFactory { url, height: imageHeight, width: imageHeight * 3 / 2, - fit: BoxFit.cover, + fit: BoxFit.fill, ); } else { img = Image.asset( url, height: imageHeight, width: imageHeight * 3 / 2, - fit: BoxFit.cover, + fit: BoxFit.fill, ); } return GestureDetector( diff --git a/lib/customWidget/promise/promise_page.dart b/lib/customWidget/promise/promise_page.dart index 42e49d3..488e0ee 100644 --- a/lib/customWidget/promise/promise_page.dart +++ b/lib/customWidget/promise/promise_page.dart @@ -94,6 +94,8 @@ class _PromisePageState extends State { context, MaterialPageRoute(builder: (c) => MineSignPage()), ); + await NativeOrientation.setPortrait(); + if (path != null) { setState(() { info['FILEPATH'] = path; @@ -197,14 +199,14 @@ class _PromisePageState extends State { (baseImgPath ?? '') + signImagePath, width: 100, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, ); } else if (signImagePath.isNotEmpty && File(signImagePath).existsSync()) { signPreview = Image.file( File(signImagePath), width: 100, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, ); } else { signPreview = const SizedBox.shrink(); diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 36f15f5..5fd1d6c 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -201,18 +201,19 @@ class _HomePageState extends State { final corppromiseData = await ApiService.checkSafeCorppromise(); if (corppromiseData['ISSIGN'] == 1) { // 承诺 - CustomAlertDialog.showConfirm( + final confirmed = await CustomAlertDialog.showConfirm( context, title: '温馨提示', content: '有未签署的安全承诺,点击确认前往签署', force: true, - onConfirm: () { - Navigator.pushReplacement( - context, - MaterialPageRoute(builder: (_) => const PromisePage()), - ); - }, + ); + if (confirmed) { + Navigator.pushReplacement( + context, + MaterialPageRoute(builder: (_) => const PromisePage()), + ); + } return; } diff --git a/lib/pages/home/study/study_detail_page.dart b/lib/pages/home/study/study_detail_page.dart index 5d62190..0df7a0b 100644 --- a/lib/pages/home/study/study_detail_page.dart +++ b/lib/pages/home/study/study_detail_page.dart @@ -255,7 +255,7 @@ class _StudyDetailPageState extends State void _onTimeUpdate() { if (_videoController == null || !_videoController!.value.isPlaying) return; final curr = _videoController!.value.position; - if (!_throttleFlag && (curr - _lastReported).inSeconds >= 5) { + if (!_throttleFlag && (curr - _lastReported).inSeconds >= 0) { _throttleFlag = true; _lastReported = curr; _submitPlayTime( diff --git a/lib/pages/home/tap/item_list_widget.dart b/lib/pages/home/tap/item_list_widget.dart index e96ddb9..b4bad1a 100644 --- a/lib/pages/home/tap/item_list_widget.dart +++ b/lib/pages/home/tap/item_list_widget.dart @@ -704,7 +704,7 @@ class ItemListWidget { '${ApiService.baseImgPath}${imageUrls![index] ?? ''}', width: 80, // 图片宽度 height: 80, // 图片高度 - fit: BoxFit.cover, + fit: BoxFit.fill, loadingBuilder: (context, child, loadingProgress) { if (loadingProgress == null) return child; return Container( diff --git a/lib/pages/home/tap/tabList/special_wrok/MeasuresListWidget.dart b/lib/pages/home/tap/tabList/special_wrok/MeasuresListWidget.dart index 0d9a28c..68edf23 100644 --- a/lib/pages/home/tap/tabList/special_wrok/MeasuresListWidget.dart +++ b/lib/pages/home/tap/tabList/special_wrok/MeasuresListWidget.dart @@ -420,7 +420,7 @@ class OtherMeasuresWidget extends StatelessWidget { '$baseImgPath$path', width: 60, height: 60, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image), ), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dh_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/dh_work/SpecialWorkFormBaseWork.dart index c37367a..18582ca 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dh_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dh_work/SpecialWorkFormBaseWork.dart @@ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dh_work/qtfx_work_detail/hotwork_gas_list.dart b/lib/pages/home/tap/tabList/special_wrok/dh_work/qtfx_work_detail/hotwork_gas_list.dart index 73a7fb4..eaca1e9 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dh_work/qtfx_work_detail/hotwork_gas_list.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dh_work/qtfx_work_detail/hotwork_gas_list.dart @@ -109,7 +109,7 @@ class _HotworkGasListState extends State { img, width: 50, height: 30, - fit: BoxFit.cover, + fit: BoxFit.fill, ), ); }), diff --git a/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadDetailFormWidget.dart b/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadDetailFormWidget.dart index 6e15288..4183c8d 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadDetailFormWidget.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadDetailFormWidget.dart @@ -163,7 +163,7 @@ class _CutroadDetailFormWidgetState extends State { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -203,7 +203,7 @@ class _CutroadDetailFormWidgetState extends State { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadFormBaseWork.dart index a40f77e..0f57f3a 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dl_work/CutroadFormBaseWork.dart @@ -134,7 +134,7 @@ class CutroadFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -174,7 +174,7 @@ class CutroadFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dt_work/BreakgroundDetailFormWidget.dart b/lib/pages/home/tap/tabList/special_wrok/dt_work/BreakgroundDetailFormWidget.dart index fd6adac..1f3fadf 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dt_work/BreakgroundDetailFormWidget.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dt_work/BreakgroundDetailFormWidget.dart @@ -170,7 +170,7 @@ class _BreakgroundDetailFormWidgetState fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, @@ -214,7 +214,7 @@ class _BreakgroundDetailFormWidgetState fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, @@ -349,7 +349,7 @@ class _BreakgroundDetailFormWidgetState onTap: () { presentOpaque(SingleImageViewer(imageUrl: fullUrl), context); }, - child: Image.network(fullUrl, fit: BoxFit.cover), + child: Image.network(fullUrl, fit: BoxFit.fill), ), ); }), diff --git a/lib/pages/home/tap/tabList/special_wrok/dt_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/dt_work/SpecialWorkFormBaseWork.dart index 92d416e..1ce1705 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dt_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dt_work/SpecialWorkFormBaseWork.dart @@ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dz_work/HoistworkDetailFormWidget.dart b/lib/pages/home/tap/tabList/special_wrok/dz_work/HoistworkDetailFormWidget.dart index 48ab510..80dc9d5 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dz_work/HoistworkDetailFormWidget.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dz_work/HoistworkDetailFormWidget.dart @@ -165,7 +165,7 @@ class _HoistworkDetailFormWidgetState extends State { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -205,7 +205,7 @@ class _HoistworkDetailFormWidgetState extends State { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/dz_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/dz_work/SpecialWorkFormBaseWork.dart index a3c31ee..329b482 100644 --- a/lib/pages/home/tap/tabList/special_wrok/dz_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/dz_work/SpecialWorkFormBaseWork.dart @@ -134,7 +134,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -174,7 +174,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/gc_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/gc_work/SpecialWorkFormBaseWork.dart index 4230ba8..a56beb1 100644 --- a/lib/pages/home/tap/tabList/special_wrok/gc_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/gc_work/SpecialWorkFormBaseWork.dart @@ -134,7 +134,7 @@ class HighWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -174,7 +174,7 @@ class HighWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/lsyd_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/lsyd_work/SpecialWorkFormBaseWork.dart index 5ea23bb..5185d14 100644 --- a/lib/pages/home/tap/tabList/special_wrok/lsyd_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/lsyd_work/SpecialWorkFormBaseWork.dart @@ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/lsyd_work/qtfx_work_detail/electricity_gas_list.dart b/lib/pages/home/tap/tabList/special_wrok/lsyd_work/qtfx_work_detail/electricity_gas_list.dart index 268e9fc..852f82c 100644 --- a/lib/pages/home/tap/tabList/special_wrok/lsyd_work/qtfx_work_detail/electricity_gas_list.dart +++ b/lib/pages/home/tap/tabList/special_wrok/lsyd_work/qtfx_work_detail/electricity_gas_list.dart @@ -110,7 +110,7 @@ class _ElectricityGasListState extends State { img, width: 50, height: 30, - fit: BoxFit.cover, + fit: BoxFit.fill, ), ); }), diff --git a/lib/pages/home/tap/tabList/special_wrok/mbcd_work/BlindboardFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/mbcd_work/BlindboardFormBaseWork.dart index 7efab0d..aad20d6 100644 --- a/lib/pages/home/tap/tabList/special_wrok/mbcd_work/BlindboardFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/mbcd_work/BlindboardFormBaseWork.dart @@ -137,7 +137,7 @@ class BlindboardFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -177,7 +177,7 @@ class BlindboardFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/sxkj_work/SpecialWorkFormBaseWork.dart b/lib/pages/home/tap/tabList/special_wrok/sxkj_work/SpecialWorkFormBaseWork.dart index f05415b..59f53f7 100644 --- a/lib/pages/home/tap/tabList/special_wrok/sxkj_work/SpecialWorkFormBaseWork.dart +++ b/lib/pages/home/tap/tabList/special_wrok/sxkj_work/SpecialWorkFormBaseWork.dart @@ -135,7 +135,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: 50, height: 50, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon( Icons.broken_image, size: 40, @@ -175,7 +175,7 @@ class SpecialWorkFormBaseWork extends StatelessWidget { fullUrl, width: imageWidth, height: imageHeight, - fit: BoxFit.cover, + fit: BoxFit.fill, errorBuilder: (_, __, ___) => const Icon(Icons.broken_image, size: 60), ), diff --git a/lib/pages/home/tap/tabList/special_wrok/sxkj_work/qtfx_work_detail/spacework_gas_list.dart b/lib/pages/home/tap/tabList/special_wrok/sxkj_work/qtfx_work_detail/spacework_gas_list.dart index 0d7f000..077bacb 100644 --- a/lib/pages/home/tap/tabList/special_wrok/sxkj_work/qtfx_work_detail/spacework_gas_list.dart +++ b/lib/pages/home/tap/tabList/special_wrok/sxkj_work/qtfx_work_detail/spacework_gas_list.dart @@ -111,7 +111,7 @@ class _SpaceworkGasListState extends State { img, width: 50, height: 30, - fit: BoxFit.cover, + fit: BoxFit.fill, ), ); }),