|
@@ -33,7 +33,7 @@ class MeasureController implements IMeasureController {
|
|
|
IApplication? _application;
|
|
|
int _recursive = 0;
|
|
|
|
|
|
- final bool enableLoopPlayback;
|
|
|
+ late bool _enableLoopPlayback;
|
|
|
final ValueCallback<bool>? onLoopPlaybackEnableChanged;
|
|
|
|
|
|
late final MeasureImagesFetchFunc _imagesFetchFunc;
|
|
@@ -43,9 +43,10 @@ class MeasureController implements IMeasureController {
|
|
|
MeasureController(
|
|
|
String code, {
|
|
|
required MeasureImagesFetchFunc imagesFetchFunc,
|
|
|
- this.enableLoopPlayback = false,
|
|
|
+ bool enableLoopPlayback = false,
|
|
|
this.onLoopPlaybackEnableChanged,
|
|
|
}) {
|
|
|
+ _enableLoopPlayback = enableLoopPlayback;
|
|
|
_examInfo = ExamInfo(code);
|
|
|
_imagesFetchFunc = imagesFetchFunc;
|
|
|
}
|
|
@@ -119,7 +120,7 @@ class MeasureController implements IMeasureController {
|
|
|
_windowSetState(index);
|
|
|
_playerController = Get.put<IPlayerController>(
|
|
|
VidPlayerController(url)
|
|
|
- ..enableLoop = enableLoopPlayback
|
|
|
+ ..enableLoop = _enableLoopPlayback
|
|
|
..enableLoopChanged.addListener(_onEnableLoopPlaybackChanged),
|
|
|
);
|
|
|
playerController.firstFrameLoaded.addListener(_onFirstFrameLoaded);
|
|
@@ -129,6 +130,7 @@ class MeasureController implements IMeasureController {
|
|
|
}
|
|
|
|
|
|
void _onEnableLoopPlaybackChanged(Object _, bool e) {
|
|
|
+ _enableLoopPlayback = e;
|
|
|
onLoopPlaybackEnableChanged?.call(e);
|
|
|
}
|
|
|
|