takeLast method

String takeLast(
  1. int count
)

Returns the string suffix with count characters. If count is larger than length return the whole string.

Implementation

String takeLast(int count) => substring(max(length - count, 0));