checkNeedToCapture method
dynamic
checkNeedToCapture(
- int i
)
Implementation
checkNeedToCapture(int i) async {
// if (i == null){
// i = 0;
// }
// movechecker(i);
// setState(() {
if (widget.imageSelected.length > i) {
index = i;
imageModulModel = widget.imageSelected[i];
// print("i awal ${index} i ${i}");
setState(() {});
if (widget.imageSelected[i].file != null) {
fileSelected = widget.imageSelected[i].file!;
checkrotation();
setState(() {});
}
// i = i + 1;
// checkNeedToCapture(i);
// Future.delayed(Duration(seconds: 1)).then((value) async {
if (widget.imageSelected[i].rotation! > 0) {
File valueEnding = HelperImage().FilechangeRotation(filebefore: widget.imageSelected[i].file);
String pathfile = valueEnding.path;
XFile? result = await FlutterImageCompress.compressAndGetFile(
pathfile, pathfile + ".jpg",
quality: Config.compresValue);
widget.imageSelected[i].currentBrightness = _currentBrightness;
widget.imageSelected[i].currentHue = _currentHue;
widget.imageSelected[i].currentSaturnation = _currentSaturnation;
if (result != null){
widget.imageSelected[i].file = File(result.path);
}else{
widget.imageSelected[i].file = valueEnding;
}
}
// print("value eee ${value} widegege ${widget.imageSelected[i].file}");
// Future.delayed(Duration(seconds: 1)).then((value) {
i = i + 1;
// print("check dimana ${i}");
// key12 = new GlobalKey();
// Future.delayed(Duration(seconds: 1)).then((value) {
checkNeedToCapture(i);
// });
// });
// });
} else {
checkAgain();
}
// });
}