onInactived method

void onInactived()

Executes code when the application is in the inactive state.

Implementation

// @override
void onInactived() {
  // executa o código do onClose aqui
}