onTap method

void onTap(
  1. String text
)

Implementation

void onTap(String text) {
  if (controller.text.isEmpty && text == '⌫') {
    return;
  }

  if (text == '⌫') {
    controller.text =
        controller.text.substring(0, controller.text.length - 1);
    return;
  }

  controller.text = controller.text + text;
}