@@ -10,13 +10,11 @@ import 'event_processor/android_platform_exception_event_processor.dart';
10
10
import 'event_processor/flutter_exception_event_processor.dart' ;
11
11
import 'event_processor/platform_exception_event_processor.dart' ;
12
12
import 'integrations/screenshot_integration.dart' ;
13
- import 'native/cocoa/sentry_native_cocoa .dart' ;
13
+ import 'native/factory .dart' ;
14
14
import 'native/native_scope_observer.dart' ;
15
- import 'native/sentry_native_channel.dart' ;
16
15
import 'profiling.dart' ;
17
16
import 'renderer/renderer.dart' ;
18
17
import 'native/sentry_native.dart' ;
19
- import 'native/sentry_native_binding.dart' ;
20
18
21
19
import 'integrations/integrations.dart' ;
22
20
import 'event_processor/flutter_enricher_event_processor.dart' ;
@@ -51,16 +49,7 @@ mixin SentryFlutter {
51
49
}
52
50
53
51
if (flutterOptions.platformChecker.hasNativeIntegration) {
54
- late final SentryNativeBinding binding;
55
-
56
- // Set a default native channel to the singleton SentryNative instance.
57
- if (flutterOptions.platformChecker.platform.isIOS ||
58
- flutterOptions.platformChecker.platform.isMacOS) {
59
- binding = SentryNativeCocoa (channel);
60
- } else {
61
- binding = SentryNativeChannel (channel);
62
- }
63
-
52
+ final binding = createBinding (flutterOptions.platformChecker, channel);
64
53
_native = SentryNative (flutterOptions, binding);
65
54
}
66
55
0 commit comments