mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
* chore(packages): Added pedantic package to enforce linting and styling * feat(lunasea): Enforce effective dart styling * Comment and format colours class * Localize additional classes in Dashboard, cleanup additional code * chore(lunasea): Major refactor by running dartfmt on the entire codebase, added widget return for page routers * Additional work on conforming to effective dart style * fix(share_plus): Roll back share_plus package to 2.0.0 to support iOS 12 or lower * chore(lunasea): Fix remaining enabled analysis warnings
21 lines
711 B
Dart
21 lines
711 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();
|
|
}
|