Files
lunasea/lib/core/firebase/core.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();
}