Line data Source code
1 : import 'package:combine/src/isolate_factory/isolate_factory.dart'; 2 : import 'package:combine/src/isolate_factory/native_isolate_factory.dart' 3 : if (dart.library.html) 'package:combine/src/isolate_factory/web_isolate_factory.dart'; 4 : import 'package:flutter/foundation.dart'; 5 : 6 5 : @visibleForTesting 7 : void setTestIsolateFactory(IsolateFactory isolateFactory) { 8 : _testIsolateFactory = isolateFactory; 9 : } 10 : 11 : IsolateFactory? _testIsolateFactory; 12 : 13 : /// Returns test isolate factory or it's implementation depending on the platform. 14 5 : IsolateFactory get effectiveIsolateFactory { 15 0 : return _testIsolateFactory ?? IsolateFactoryImpl(); 16 : }