appLifecycleStateChanged method
Implementation
@override
void appLifecycleStateChanged(
AppLifecycleState previous,
AppLifecycleState current,
) {
// When the app is backgrounded or foregrounded, reset inputs to avoid
// any weirdness with tap/key state getting out of sync.
_tapInput.reset();
_keyboardInput.keysDown.clear();
pressedTime = 0;
justPressed = false;
}