height method

int height()

The number of lines in the original text.

Implementation

int height() => text.split('\n').length;