isAutoRefreshEnabled property

bool get isAutoRefreshEnabled

Implementation

bool get isAutoRefreshEnabled => _isAutoRefreshEnabled;
set isAutoRefreshEnabled (bool enabled)

Implementation

set isAutoRefreshEnabled(bool enabled) {
  _isAutoRefreshEnabled = enabled;

  if (enabled) {
    final refreshComputationsStream = Stream.periodic(autoRefreshPeriod);

    subxMap.add(
      'autoRefreshComputations',
      refreshComputationsStream.listen(handleAutoRefreshComputations),
    );
  } else {
    subxMap.cancelForKey('autoRefreshComputations');
  }
}