Léo Salé пре 4 година
родитељ
комит
7eeab46cb6
6 измењених фајлова са 122 додато и 1 уклоњено
  1. 7 0
      android/firebase_app_id_file.json
  2. 7 0
      ios/firebase_app_id_file.json
  3. 59 0
      lib/firebase_options.dart
  4. 7 1
      lib/main.dart
  5. 41 0
      pubspec.lock
  6. 1 0
      pubspec.yaml

+ 7 - 0
android/firebase_app_id_file.json

@@ -0,0 +1,7 @@
+{
+  "file_generated_by": "FlutterFire CLI",
+  "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
+  "GOOGLE_APP_ID": "1:33414107403:android:aaf9d5af5ed2a103a1920e",
+  "FIREBASE_PROJECT_ID": "physigo",
+  "GCM_SENDER_ID": "33414107403"
+}

+ 7 - 0
ios/firebase_app_id_file.json

@@ -0,0 +1,7 @@
+{
+  "file_generated_by": "FlutterFire CLI",
+  "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
+  "GOOGLE_APP_ID": "1:33414107403:ios:0f0aeb94928992ffa1920e",
+  "FIREBASE_PROJECT_ID": "physigo",
+  "GCM_SENDER_ID": "33414107403"
+}

+ 59 - 0
lib/firebase_options.dart

@@ -0,0 +1,59 @@
+// File generated by FlutterFire CLI.
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
+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) {
+      throw UnsupportedError(
+        'DefaultFirebaseOptions have not been configured for web - '
+        'you can reconfigure this by running the FlutterFire CLI again.',
+      );
+    }
+    switch (defaultTargetPlatform) {
+      case TargetPlatform.android:
+        return android;
+      case TargetPlatform.iOS:
+        return ios;
+      case TargetPlatform.macOS:
+        throw UnsupportedError(
+          'DefaultFirebaseOptions have not been configured for macos - '
+          'you can reconfigure this by running the FlutterFire CLI again.',
+        );
+      default:
+        throw UnsupportedError(
+          'DefaultFirebaseOptions are not supported for this platform.',
+        );
+    }
+  }
+
+  static const FirebaseOptions android = FirebaseOptions(
+    apiKey: 'AIzaSyBUb8raBFHQA_AwR5cUrdCT6TkoWjj_jO8',
+    appId: '1:33414107403:android:aaf9d5af5ed2a103a1920e',
+    messagingSenderId: '33414107403',
+    projectId: 'physigo',
+    storageBucket: 'physigo.appspot.com',
+  );
+
+  static const FirebaseOptions ios = FirebaseOptions(
+    apiKey: 'AIzaSyC56cnz5wDs14J2QQnzGutFyhw1Rt_nc0Q',
+    appId: '1:33414107403:ios:0f0aeb94928992ffa1920e',
+    messagingSenderId: '33414107403',
+    projectId: 'physigo',
+    storageBucket: 'physigo.appspot.com',
+    iosClientId: '33414107403-7e3vb8825iemlec2geietj4b00ldhbbj.apps.googleusercontent.com',
+    iosBundleId: 'com.example.physigo',
+  );
+}

+ 7 - 1
lib/main.dart

@@ -1,6 +1,12 @@
 import 'package:flutter/material.dart';
+import 'package:firebase_core/firebase_core.dart';
+import 'package:physigo/firebase_options.dart';
 
-void main() {
+void main() async {
+  WidgetsFlutterBinding.ensureInitialized();
+  await Firebase.initializeApp(
+    options: DefaultFirebaseOptions.currentPlatform,
+  );
   runApp(const PhysiGo());
 }
 

+ 41 - 0
pubspec.lock

@@ -57,6 +57,27 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "1.2.0"
+  firebase_core:
+    dependency: "direct main"
+    description:
+      name: firebase_core
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.15.0"
+  firebase_core_platform_interface:
+    dependency: transitive
+    description:
+      name: firebase_core_platform_interface
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "4.2.5"
+  firebase_core_web:
+    dependency: transitive
+    description:
+      name: firebase_core_web
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "1.6.2"
   flutter:
     dependency: "direct main"
     description: flutter
@@ -74,6 +95,18 @@ packages:
     description: flutter
     source: sdk
     version: "0.0.0"
+  flutter_web_plugins:
+    dependency: transitive
+    description: flutter
+    source: sdk
+    version: "0.0.0"
+  js:
+    dependency: transitive
+    description:
+      name: js
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "0.6.3"
   lints:
     dependency: transitive
     description:
@@ -109,6 +142,13 @@ packages:
       url: "https://pub.dartlang.org"
     source: hosted
     version: "1.8.0"
+  plugin_platform_interface:
+    dependency: transitive
+    description:
+      name: plugin_platform_interface
+      url: "https://pub.dartlang.org"
+    source: hosted
+    version: "2.1.2"
   sky_engine:
     dependency: transitive
     description: flutter
@@ -172,3 +212,4 @@ packages:
     version: "2.1.1"
 sdks:
   dart: ">=2.16.2 <3.0.0"
+  flutter: ">=1.12.13+hotfix.5"

+ 1 - 0
pubspec.yaml

@@ -34,6 +34,7 @@ dependencies:
   # The following adds the Cupertino Icons font to your application.
   # Use with the CupertinoIcons class for iOS style icons.
   cupertino_icons: ^1.0.2
+  firebase_core: ^1.15.0
 
 dev_dependencies:
   flutter_test: