register method

Object register({
  1. required VoidCallback restartVisibilityTimer,
  2. required VoidCallback showControls,
  3. required VoidCallback hideControls,
  4. required ValueChanged<bool> setControlsPinned,
})

Implementation

Object register({
  required VoidCallback restartVisibilityTimer,
  required VoidCallback showControls,
  required VoidCallback hideControls,
  required ValueChanged<bool> setControlsPinned,
}) {
  final token = Object();
  _restartVisibilityTimerCallbacks[token] = restartVisibilityTimer;
  _showControlsCallbacks[token] = showControls;
  _hideControlsCallbacks[token] = hideControls;
  _setControlsPinnedCallbacks[token] = setControlsPinned;
  return token;
}