浏览代码

Merge branch 'master' of http://git.ius.plus:88/melon.yin/fis_lib_measure

gavin.chen 2 年之前
父节点
当前提交
77f556e33e

+ 1 - 1
lib/view/paint/ai_patint_controller.dart

@@ -161,11 +161,11 @@ class AiPatintController extends GetxController {
     if (state.aiResult.isEmpty) {
       return false;
     } else if (state.aiResult.length == 1) {
+      updateFeatures();
       final diagResultsForEachOrgan =
           state.aiResult[0].diagResultsForEachOrgan?[state.aiResultIndex];
       final detectedObjects = diagResultsForEachOrgan!.detectedObjects;
       diagnosisOrgan = diagResultsForEachOrgan.organ;
-      updateFeatures();
       if (detectedObjects!.isNotEmpty) {
         onSingleFrameImage(
           detectedObjects,

+ 2 - 0
lib/view/paint/ai_patint_result.dart

@@ -63,6 +63,7 @@ class _AIPaintInfoState extends State<AIPaintInfoReslut> {
   void initState() {
     //监听Widget是否绘制完毕
     super.initState();
+    aiPatintController.updateFeatures();
     widget.controller.eventHandler.addListener(onControllerEvent);
   }
 
@@ -83,6 +84,7 @@ class _AIPaintInfoState extends State<AIPaintInfoReslut> {
   @override
   Widget build(BuildContext context) {
     Widget? child;
+
     if (widget.controller.status == VidPlayStatus.pause) {
       child = LayoutBuilder(builder: (context, constraints) {
         try {

+ 26 - 24
lib/view/paint/parts/ai_resul_info.dart

@@ -68,9 +68,9 @@ class _ResultInfoState extends State<ResultInfo> {
                     left: 8,
                     right: 8,
                   ),
-                  child: const Text(
-                    'AI诊断结果',
-                    style: TextStyle(
+                  child: Text(
+                    i18nBook.measure.aiDiagnosticResults.t,
+                    style: const TextStyle(
                       color: Colors.white,
                     ),
                   ),
@@ -81,28 +81,30 @@ class _ResultInfoState extends State<ResultInfo> {
           Row(
             mainAxisAlignment: MainAxisAlignment.spaceBetween,
             children: [
-              Container(
-                padding: const EdgeInsets.only(
-                  left: 10,
-                ),
-                child: Column(
-                  crossAxisAlignment: CrossAxisAlignment.start,
-                  mainAxisAlignment: MainAxisAlignment.start,
-                  children: [
-                    _buildTitle(
-                      i18nBook.measure.diseaseLabels.t,
-                      _buildAITitle(),
-                    ),
-                    if (descriptions != '' && descriptions != null)
+              Expanded(
+                child: Container(
+                  padding: const EdgeInsets.only(
+                    left: 10,
+                  ),
+                  child: Column(
+                    crossAxisAlignment: CrossAxisAlignment.start,
+                    mainAxisAlignment: MainAxisAlignment.start,
+                    children: [
                       _buildTitle(
-                        i18nBook.measure.isLesionSize.t,
-                        _buildLesionSize(
-                          descriptions?['HorizontalLengthInPixel'] ?? 0,
-                          descriptions?['VerticalLengthInPixel'] ?? 0,
-                          unitsPhysicalPixels,
-                        ),
-                      )
-                  ],
+                        i18nBook.measure.diseaseLabels.t,
+                        _buildAITitle(),
+                      ),
+                      if (descriptions != '' && descriptions != null)
+                        _buildTitle(
+                          i18nBook.measure.isLesionSize.t,
+                          _buildLesionSize(
+                            descriptions?['HorizontalLengthInPixel'] ?? 0,
+                            descriptions?['VerticalLengthInPixel'] ?? 0,
+                            unitsPhysicalPixels,
+                          ),
+                        )
+                    ],
+                  ),
                 ),
               ),
               Container(