isNumberPressed method

bool isNumberPressed(
  1. String? number
)

Implementation

bool isNumberPressed(String? number){
  if((number != null && int.tryParse(number) != null) || number == '-'){
    return true;
  }
  return false;
}