Skip to content

Commit 9c9faba

Browse files
authored
chore(firebase_core): remove dependency on 'universal_platform' (#2916)
1 parent 27d574e commit 9c9faba

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

packages/firebase_core/firebase_core_platform_interface/lib/firebase_core_platform_interface.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ library firebase_core_platform_interface;
88
import 'dart:async';
99

1010
import 'package:flutter/cupertino.dart';
11+
import 'package:flutter/foundation.dart';
1112
import 'package:flutter/services.dart';
1213
import 'package:meta/meta.dart' show required;
1314
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
1415
import 'package:quiver/core.dart';
15-
import 'package:universal_platform/universal_platform.dart';
1616

1717
part 'src/firebase_core_exceptions.dart';
1818

packages/firebase_core/firebase_core_platform_interface/lib/src/firebase_core_exceptions.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,19 @@ FirebaseException noDefaultAppInitialization() {
3737
FirebaseException coreNotInitialized() {
3838
String message;
3939

40-
if (UniversalPlatform.isWeb) {
40+
if (kIsWeb) {
4141
message =
4242
'''Firebase has not been correctly initialized. Have you added the Firebase import scripts to your index.html file?
4343
4444
View the Web Installation documentation for more information: https://firebaseextended.github.io/flutterfire/docs/installation/web
4545
''';
46-
} else if (UniversalPlatform.isAndroid) {
46+
} else if (defaultTargetPlatform == TargetPlatform.android) {
4747
message =
4848
'''Firebase has not been correctly initialized. Have you added the "google-services.json" file to the project?
4949
5050
View the Android Installation documentation for more information: https://firebaseextended.github.io/flutterfire/docs/installation/android
5151
''';
52-
} else if (UniversalPlatform.isIOS) {
52+
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
5353
message =
5454
'''Firebase has not been correctly initialized. Have you added the "GoogleService-Info.plist" file to the project?
5555

packages/firebase_core/firebase_core_platform_interface/pubspec.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies:
1111
meta: ^1.1.8
1212
plugin_platform_interface: ^1.0.2
1313
quiver: ">=2.0.0 <3.0.0"
14-
universal_platform: ^0.1.3
1514

1615
dev_dependencies:
1716
pedantic: ^1.8.0

0 commit comments

Comments
 (0)