int _calculate()

in null_safety/calculate_lix/lib/lix.dart [59:71]


  int _calculate() {
    int result;

    if (words == 0 || periods == 0) {
      throw ArgumentError('Text must contain at least one full sentence.');
    } else {
      final sentenceLength = words / periods;
      final wordLength = (longWords * 100) / words;
      result = (sentenceLength + wordLength).round();
    }

    return result;
  }