screenInFocus method

dynamic screenInFocus(
  1. bool focus, {
  2. required dynamic sex,
  3. required dynamic age,
  4. required dynamic weight,
  5. required dynamic licenseKey,
})

Implementation

screenInFocus(bool focus,
    {required sex,
    required age,
    required weight,
    required licenseKey}) async {
  if (focus) {
    if (!await _requestCameraPermission()) {
      return;
    }

    _createSession(
        sex: sex, age: age, weight: weight, licenseKey: licenseKey);
  } else {
    _terminateSession();
  }
}