isHorizontalLine method
check if the drawn line on a horizontal track
Implementation
bool isHorizontalLine(List<LetterOffset> offsets) {
if (offsets.isEmpty) {
return false;
}
double firstY = offsets.first.getSmallerOffset.dy;
for (LetterOffset offset in offsets) {
if (offset.getSmallerOffset.dy != firstY) {
return false;
}
}
return true;
}