syncState method

Future<void> syncState({
  1. int delay = 100,
})

Sync the media state from the media source to the state provider, delaying if necessary.

Implementation

Future<void> syncState({int delay = 100}) {
  if (delay > 0) {
    return Future.delayed(Duration(milliseconds: delay), () {
      return _syncState();
    });
  } else {
    return _syncState();
  }
}