MobileLifecycleCoordinator constructor
- required MobileLifecycleAdapter adapter,
- Reprovider? reprovider,
- NetworkManager? networkManager,
- BlockStore? blockStore,
- Future<
void> onDetached()?, - bool autoScaleSwarm = true,
- int maxForegroundConnections = 50,
- int maxLowPowerConnections = 15,
- int maxBackgroundConnections = 2,
- bool pauseReproviderOnBackground = true,
- bool flushBlockStoreOnBackground = true,
- bool requestBackgroundExtensionOnPause = true,
- 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');