(feat): Implemented Overseerr core architecture, Added platform checks for Firebase, Added module flagging (#425)

This commit is contained in:
Jagandeep Brar
2021-04-13 22:07:14 -05:00
committed by GitHub
parent e7181e70cc
commit e54e4eecec
47 changed files with 739 additions and 99 deletions

View File

@@ -6,7 +6,9 @@ import 'package:lunasea/core.dart';
class LunaFirebaseAnalytics {
/// Returns true if Firebase Analytics is compatible with this build system/platform.
static bool get isPlatformCompatible => !Platform.isLinux && !Platform.isMacOS && !Platform.isWindows;
static bool get isPlatformCompatible {
return LunaFirebase.isPlatformCompatible && !Platform.isLinux && !Platform.isMacOS && !Platform.isWindows;
}
/// Returns an instance of [FirebaseAnalytics].
///

View File

@@ -1,3 +1,5 @@
import 'dart:io';
import 'package:firebase_core/firebase_core.dart';
class LunaFirebase {
@@ -6,6 +8,9 @@ class LunaFirebase {
/// Throws an error if [LunaFirebase.initialize] has not been called.
static FirebaseApp get instance => Firebase.app();
/// Returns true if Firebase in its entirety is compatible with this build system/platform.
static bool get isPlatformCompatible => Platform.isIOS || Platform.isAndroid || Platform.isMacOS;
/// Initialize Firebase and configuration.
///
/// This must be called before anything accesses Firebase services, or an exception will be thrown.

View File

@@ -5,7 +5,9 @@ import 'package:lunasea/core.dart';
class LunaFirebaseCrashlytics {
/// Returns true if Firebase Analytics is compatible with this build system/platform.
static bool get isPlatformCompatible => !Platform.isLinux && !Platform.isMacOS && !Platform.isWindows;
static bool get isPlatformCompatible {
return LunaFirebase.isPlatformCompatible && !Platform.isLinux && !Platform.isMacOS && !Platform.isWindows;
}
/// Returns an instance of [FirebaseCrashlytics].
///