removeLastItems method

void removeLastItems(
  1. int amount
)

Implementation

void removeLastItems(int amount) {
  final end = count;
  final start = end - amount;

  removeRange(start >= 0 ? start : 0, end);
}