Browse Source

0009409: 【优化】【图像】缩略图左下角应加上部位描述字段 解决部分图片不显示描述的问题

Caroline 2 years ago
parent
commit
55a97dcfe4
1 changed files with 13 additions and 12 deletions
  1. 13 12
      lib/components/picture_components.dart

+ 13 - 12
lib/components/picture_components.dart

@@ -169,13 +169,18 @@ class FContentImage extends StatelessWidget implements FWidget {
     return FPositioned(
       bottom: 5,
       left: 5,
-      child: FText(
-        remedicalInfo?.application ?? "",
-        style: TextStyle(
-          color: Colors.white,
-          fontSize: 10,
-          overflow: TextOverflow.ellipsis,
-        ),
+      child: _buildApplication(),
+    );
+  }
+
+  ///构建描述字段
+  FWidget _buildApplication() {
+    return FText(
+      remedicalInfo?.application ?? "",
+      style: TextStyle(
+        color: Colors.white,
+        fontSize: 10,
+        overflow: TextOverflow.ellipsis,
       ),
     );
   }
@@ -332,10 +337,6 @@ class FContentImage extends StatelessWidget implements FWidget {
 
   FWidget _buildAIDiagnosticOrgans() {
     switch (diagnosisOrgans?[0]) {
-      case DiagnosisOrganEnum.Null:
-        return const FSizedBox();
-      case DiagnosisOrganEnum.placeHolder_1:
-        return const FSizedBox();
       case DiagnosisOrganEnum.Breast:
         return FIcon(
           FIcons.fis_breast,
@@ -381,7 +382,7 @@ class FContentImage extends StatelessWidget implements FWidget {
         );
 
       default:
-        return FContainer();
+        return _buildApplication();
     }
   }
 }