Skip to content

Commit 409ce18

Browse files
authored
fix: cast call.arguments to Map rather than Map<String, dynamic> to fix setUserId and setDeviceId (#251)
1 parent 02be47d commit 409ce18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/amplitude_web.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AmplitudeFlutterPlugin {
7474
}
7575
case "setUserId":
7676
{
77-
Map<String, dynamic> args = call.arguments['properties'];
77+
Map args = call.arguments['properties'];
7878
String? userId = args['setUserId'];
7979
instance.setUserId(userId?.toJS);
8080
}
@@ -84,7 +84,7 @@ class AmplitudeFlutterPlugin {
8484
}
8585
case "setDeviceId":
8686
{
87-
Map<String, dynamic> args = call.arguments['properties'];
87+
Map args = call.arguments['properties'];
8888
String? deviceId = args['setDeviceId'];
8989
instance.setDeviceId(deviceId?.toJS);
9090
}

0 commit comments

Comments
 (0)