disableSync<T> method

T disableSync<T>(
  1. T f()
)
inherited

Executes f with RaylibTemp syncing temporarily disabled, restoring the previous sync state afterward.

Implementation

T disableSync<T>(T Function() f) {
  final oldSyncing = $.doSync;
  $.enableSyncing(false);
  final result = f();
  $.enableSyncing(oldSyncing);
  return result;
}