clearFocus static method

void clearFocus(
  1. BuildContext context
)

Clears focus of current object. Generally used to hide keyboard

Implementation

static void clearFocus(BuildContext context) {
  FocusScope.of(context).requestFocus(new FocusNode());
}