dropLastCharacter method

void dropLastCharacter()

Implementation

void dropLastCharacter() {
  if (text.isEmpty) return;
  final String updated = text.substring(0, text.length - 1);
  value = TextEditingValue(
    text: updated,
    selection: TextSelection.collapsed(offset: updated.length),
  );
}