Skip to content

Commit 2a8d6c8

Browse files
committed
chore: update logInAppPurchase to use defaultTargetPlatform for iOS check
1 parent 29fd1fa commit 2a8d6c8

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/firebase_analytics/firebase_analytics/lib/firebase_analytics.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import 'dart:io';
6-
75
import 'package:firebase_analytics_platform_interface/firebase_analytics_platform_interface.dart';
86
import 'package:firebase_core/firebase_core.dart';
97
import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart'

packages/firebase_analytics/firebase_analytics/lib/src/firebase_analytics.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ class FirebaseAnalytics extends FirebasePluginPlatform {
12231223
bool? subscription,
12241224
num? value,
12251225
}) {
1226-
if (!Platform.isIOS) {
1226+
if (defaultTargetPlatform != TargetPlatform.iOS) {
12271227
throw UnimplementedError('logInAppPurchase() is only supported on iOS.');
12281228
}
12291229
return _delegate.logEvent(

0 commit comments

Comments
 (0)