Line data Source code
1 : import 'package:combine/src/combine_worker/worker_manager_factory/combine_worker_manager_factory.dart'; 2 : import 'package:combine/src/combine_worker/worker_manager_factory/native_worker_manager_factory.dart' 3 : if (dart.library.html) 'package:combine/src/combine_worker/worker_manager_factory/web_worker_manager_factory.dart'; 4 : import 'package:flutter/foundation.dart'; 5 : 6 2 : @visibleForTesting 7 : void setTestWorkerFactory(CombineWorkerManagerFactory factory) { 8 : _testWorkerFactory = factory; 9 : } 10 : 11 1 : @visibleForTesting 12 : void clearWorkerFactory() { 13 : _testWorkerFactory = null; 14 : } 15 : 16 : CombineWorkerManagerFactory? _testWorkerFactory; 17 : 18 2 : CombineWorkerManagerFactory get effectiveWorkerFactory { 19 1 : return _testWorkerFactory ?? CombineWorkerManagerFactoryImpl(); 20 : } 21 : 22 1 : @visibleForTesting 23 : void setTestIsolatesCount(int count) { 24 : _testIsolatesCount = count; 25 : } 26 : 27 1 : @visibleForTesting 28 : void clearTestIsolatesCount() { 29 : _testIsolatesCount = null; 30 : } 31 : 32 : int? _testIsolatesCount; 33 : 34 1 : int? get testIsolatesCount => _testIsolatesCount;