Skip to content

Commit

Permalink
fixed args
Browse files Browse the repository at this point in the history
  • Loading branch information
mrehan27 committed Nov 26, 2024
1 parent ad14375 commit c383f2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/extensions/method_channel_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extension CustomerIOMethodChannelExtensions on MethodChannel {
/// Invokes a native method and returns the result.
/// Logs exceptions internally without propagating them.
Future<T?> invokeNativeMethod<T>(String method,
{Map<String, dynamic> arguments = const {}}) async {
[Map<String, dynamic> arguments = const {}]) async {
try {
return await invokeMethod<T>(method, arguments);
} on PlatformException catch (ex) {
Expand All @@ -28,6 +28,6 @@ extension CustomerIOMethodChannelExtensions on MethodChannel {
/// Simplifies invoking a native method that doesn't return a value.
Future<void> invokeNativeMethodVoid(String method,
[Map<String, dynamic> arguments = const {}]) async {
return await invokeNativeMethod<void>(method, arguments: arguments);
return await invokeNativeMethod<void>(method, arguments);
}
}
4 changes: 2 additions & 2 deletions lib/messaging_push/method_channel.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'dart:io';

import 'package:customer_io/extensions/method_channel_extensions.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';

import '../extensions/method_channel_extensions.dart';
import '_native_constants.dart';
import 'platform_interface.dart';

Expand Down Expand Up @@ -33,7 +33,7 @@ class CustomerIOMessagingPushMethodChannel
}

return methodChannel
.invokeNativeMethod<bool>(NativeMethods.onMessageReceived, arguments: {
.invokeNativeMethod<bool>(NativeMethods.onMessageReceived, {
NativeMethodParams.message: message,
NativeMethodParams.handleNotificationTrigger: handleNotificationTrigger,
}).then((handled) => handled == true);
Expand Down

0 comments on commit c383f2e

Please sign in to comment.