removeLast method

String? removeLast(
  1. String remove
)

Implementation

String? removeLast(String remove) {
  if (this == null) return null;
  if (this!.isEmpty) return this;
  return this!.replaceFirst(remove, '');
}