MobileLifecycleCoordinator constructor

MobileLifecycleCoordinator({
  1. required MobileLifecycleAdapter adapter,
  2. Reprovider? reprovider,
  3. NetworkManager? networkManager,
  4. BlockStore? blockStore,
  5. Future<void> onDetached()?,
  6. bool autoScaleSwarm = true,
  7. int maxForegroundConnections = 50,
  8. int maxLowPowerConnections = 15,
  9. int maxBackgroundConnections = 2,
  10. bool pauseReproviderOnBackground = true,
  11. bool flushBlockStoreOnBackground = true,
  12. bool requestBackgroundExtensionOnPause = true,
  13. Duration backgroundExtensionDuration = const Duration(seconds: 30),
})

Creates a new MobileLifecycleCoordinator.

Implementation

MobileLifecycleCoordinator({
  required this.adapter,
  this.reprovider,
  this.networkManager,
  this.blockStore,
  this.onDetached,
  this.autoScaleSwarm = true,
  this.maxForegroundConnections = 50,
  this.maxLowPowerConnections = 15,
  this.maxBackgroundConnections = 2,
  this.pauseReproviderOnBackground = true,
  this.flushBlockStoreOnBackground = true,
  this.requestBackgroundExtensionOnPause = true,
  this.backgroundExtensionDuration = const Duration(seconds: 30),
}) : _logger = Logger('MobileLifecycleCoordinator');