mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
19 lines
723 B
Dart
19 lines
723 B
Dart
import 'dart:io';
|
|
|
|
import 'package:firebase_core/firebase_core.dart';
|
|
|
|
class LunaFirebase {
|
|
/// Return an instance of [FirebaseApp].
|
|
///
|
|
/// 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.
|
|
Future<void> initialize({ String name }) async => await Firebase.initializeApp();
|
|
}
|