Skip to content

Commit

Permalink
refactor(app_check, web): small refactor around initialisation of Fir…
Browse files Browse the repository at this point in the history
…ebaseAppCheckWeb (#12474)
  • Loading branch information
Lyokone committed Mar 18, 2024
1 parent f10ce93 commit 83aab7f
Showing 1 changed file with 3 additions and 5 deletions.
Expand Up @@ -11,9 +11,6 @@ class FirebaseAppCheck extends FirebasePluginPlatform {
FirebaseAppCheck._({required this.app})
: super(app.name, 'plugins.flutter.io/firebase_app_check');

/// Cached instance of [FirebaseAppCheck];
static FirebaseAppCheck? _instance;

/// The [FirebaseApp] for this current [FirebaseAppCheck] instance.
FirebaseApp app;

Expand All @@ -36,8 +33,9 @@ class FirebaseAppCheck extends FirebasePluginPlatform {

/// Returns an instance using the default [FirebaseApp].
static FirebaseAppCheck get instance {
_instance ??= FirebaseAppCheck._(app: Firebase.app());
return _instance!;
FirebaseApp defaultAppInstance = Firebase.app();

return FirebaseAppCheck.instanceFor(app: defaultAppInstance);
}

/// Returns an instance using a specified [FirebaseApp].
Expand Down

0 comments on commit 83aab7f

Please sign in to comment.