show method

void show({
  1. Duration? duration,
})

Implementation

void show({Duration? duration}) {
  _hideTimer?.cancel();
  if (duration != null) {
    _hideTimer = Timer(duration, () {
      setState(() {
        _isHide = true;
      });
    });
  }

  setState(() {
    _isHide = false;
  });
}