Skip to content

Commit b7b8e23

Browse files
committed
remove as FutureOr Function()
1 parent 07fcaee commit b7b8e23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

flutter/lib/src/default_integrations.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class LoadContextsIntegration extends Integration<SentryFlutterOptions> {
104104
(event, {hint}) async {
105105
try {
106106
final infos = Map<String, dynamic>.from(
107-
await (_channel.invokeMethod('loadContexts') as FutureOr<Map<dynamic, dynamic>>),
107+
await (_channel.invokeMethod('loadContexts')),
108108
);
109109
if (infos['contexts'] != null) {
110110
final contexts = Contexts.fromJson(
@@ -264,7 +264,7 @@ class LoadAndroidImageListIntegration
264264
// we call on every event because the loaded image list is cached
265265
// and it could be changed on the Native side.
266266
final imageList = List<Map<dynamic, dynamic>>.from(
267-
await (_channel.invokeMethod('loadImageList') as FutureOr<Iterable<dynamic>>),
267+
await (_channel.invokeMethod('loadImageList'),
268268
);
269269

270270
if (imageList.isEmpty) {

flutter/test/load_android_image_list_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void main() {
8989
final hub = Hub(options);
9090

9191
LoadAndroidImageListIntegration(_channel)(hub, options);
92-
final ep = options.eventProcessors.first as FutureOr<SentryEvent?> Function(SentryEvent?, {dynamic hint});
92+
final ep = options.eventProcessors.first;
9393
SentryEvent? event = getEvent();
9494
event = await ep(event);
9595

@@ -101,7 +101,7 @@ void main() {
101101
final hub = Hub(options);
102102

103103
LoadAndroidImageListIntegration(_channel)(hub, options);
104-
final ep = options.eventProcessors.first as FutureOr<SentryEvent?> Function(SentryEvent?, {dynamic hint});
104+
final ep = options.eventProcessors.first;
105105
SentryEvent? event = getEvent();
106106
event = await ep(event);
107107

0 commit comments

Comments
 (0)