Skip to content

Commit

Permalink
custom stop implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Illusion47586 committed Jan 31, 2021
1 parent 1b44a73 commit 0c77821
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/view/widgets/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ class _CameraWidgetState extends State<CameraWidget> {
Logger().v("now: " +
controller.value.isStreamingImages.toString());
});
int len = 0;
data.forEach((element) {
if (element > 0) {
avg += element;
len++;
}
});
avg = (avg / len).floorToDouble();
Logger().i(data);
Logger().i("Average: $avg");
counter.value = 0;
} catch (e) {
Logger().e(e);
Expand Down

0 comments on commit 0c77821

Please sign in to comment.