chore: hide firebase setup

pull/55/head
Allison Ryan 4 years ago
parent 8d15fb6949
commit bb19bab8a6

@ -12,9 +12,7 @@ import 'dart:developer';
import 'package:bloc/bloc.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/widgets.dart';
import 'package:pinball/firebase_options.dart';
class AppBlocObserver extends BlocObserver {
@override
@ -38,9 +36,6 @@ Future<void> bootstrap(
log(details.exceptionAsString(), stackTrace: details.stack);
};
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
await runZonedGuarded(
() async {
await BlocOverrides.runZoned(

@ -1,55 +0,0 @@
// File generated by FlutterFire CLI.
// ignore_for_file: lines_longer_than_80_chars
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;
/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
// ignore: missing_enum_constant_in_switch
switch (defaultTargetPlatform) {
case TargetPlatform.android:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for android - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.iOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for ios - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
}
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyBgMVAvYccjNypCDdpW0ol6syCcISU2yjM',
appId: '1:725488140557:web:7c61a0755fc23436fe7044',
messagingSenderId: '725488140557',
projectId: 'pinball-dev',
authDomain: 'pinball-dev.firebaseapp.com',
storageBucket: 'pinball-dev.appspot.com',
measurementId: 'G-9NW8SZRFJR',
);
}

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
if (typeof firebase === 'undefined') throw new Error('hosting/init-error: Firebase SDK not detected. You must include it before /__/firebase/init.js');
firebase.initializeApp({
"apiKey": "API_KEY",
"appId": "APP_ID",
"authDomain": "AUTH_DOMAIN",
"databaseURL": "",
"measurementId": "MEASUREMENT_ID",
"messagingSenderId": "MEASUREMENT_SENDER_ID",
"projectId": "PROJECT_ID",
"storageBucket": "STORAGE_BUCKET"
});

@ -32,6 +32,8 @@
<title>Pinball</title>
<link rel="manifest" href="manifest.json">
<script src="/__/firebase/8.9.1/firebase-app.js"></script>
<script src="/__/firebase/init.js"></script>
</head>
<body>

Loading…
Cancel
Save