setFunctionVisible method

dynamic setFunctionVisible({
  1. bool visibility = true,
  2. bool always = false,
})

Implementation

setFunctionVisible({bool visibility = true, bool always = false}) {
  functionVisibility = visibility;
  functionVisibleTimer?.cancel();
  notifyListeners();
  if (!always && functionVisibility) {
    functionVisibleTimer = Timer(
        Duration(
            milliseconds: playerControls!.functionKeyVisibleMillTime.toInt()),
        () {
      functionVisibility = false;
      notifyListeners();
    });
  }
}