|
@@ -1,6 +1,7 @@
|
|
|
import 'dart:convert';
|
|
|
|
|
|
import 'package:fis_i18n/i18n.dart';
|
|
|
+import 'package:fis_measure/interfaces/process/standard_line/calibration.dart';
|
|
|
import 'package:fis_measure/interfaces/process/workspace/application.dart';
|
|
|
import 'package:fis_measure/process/visual/visual.dart';
|
|
|
import 'package:fis_measure/process/workspace/visual_loader.dart';
|
|
@@ -22,6 +23,8 @@ class ResultInfo extends StatefulWidget {
|
|
|
|
|
|
class _ResultInfoState extends State<ResultInfo> {
|
|
|
late final aiPatintController = Get.find<AiPatintController>();
|
|
|
+ final IStandardLineCalibrationController standardLineCalibrationController =
|
|
|
+ Get.find<IStandardLineCalibrationController>();
|
|
|
|
|
|
late AIDetectedObject aiDetectedObjectItem;
|
|
|
late double _unitsPhysicalPixels;
|
|
@@ -31,9 +34,22 @@ class _ResultInfoState extends State<ResultInfo> {
|
|
|
@override
|
|
|
void initState() {
|
|
|
_updateImagePhysicalSize();
|
|
|
+ standardLineCalibrationController.editStateChanged
|
|
|
+ .addListener(onStandardLineUpdated);
|
|
|
super.initState();
|
|
|
}
|
|
|
|
|
|
+ @override
|
|
|
+ void dispose() {
|
|
|
+ standardLineCalibrationController.editStateChanged
|
|
|
+ .removeListener(onStandardLineUpdated);
|
|
|
+ super.dispose();
|
|
|
+ }
|
|
|
+
|
|
|
+ void onStandardLineUpdated(_, e) {
|
|
|
+ _updateImagePhysicalSize();
|
|
|
+ }
|
|
|
+
|
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
|
final description = widget
|