getTotalReadTime method

int getTotalReadTime()

Implementation

int getTotalReadTime() {
  var wordCount = this.text!.split(" ").length;
  var minAndSec = (wordCount / 200.0).toStringAsFixed(2);
  var minutes = int.parse(minAndSec.split(".")[0]);
  var seconds =
      ((double.parse("0.${minAndSec.split(".")[1]}") * 0.60) * 100).toInt();
//    print("**************************");
//    print(this.text);
//    print(wordCount);
//    print(minAndSec);
//    print(minutes);
//    print(seconds);
//    print(seconds.toInt() + (minutes * 60));
//    print("**************************");
  return seconds.toInt() + (minutes * 60);
}