diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..a676b70 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "name": "Flutter", + "type": "dart", + "request": "launch", + "program": "lib/main.dart" + } + + + + ] +} \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 900a5f8..d83da19 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -24,6 +24,7 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 30 @@ -37,6 +38,7 @@ android { applicationId "com.flutterfairy.citycab" minSdkVersion 16 targetSdkVersion 30 + multiDexEnabled true versionCode flutterVersionCode.toInteger() versionName flutterVersionName } @@ -56,4 +58,6 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation platform('com.google.firebase:firebase-bom:28.1.0') + implementation 'com.google.firebase:firebase-analytics' } diff --git a/android/build.gradle b/android/build.gradle index 9b6ed06..152afab 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -7,6 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.google.gms:google-services:4.3.8' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/lib/main.dart b/lib/main.dart index 8399f02..bf7548d 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,9 @@ +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; -void main() { +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + await Firebase.initializeApp(); runApp(MyApp()); } diff --git a/pubspec.lock b/pubspec.lock index 7ffced4..381951a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.1" boolean_selector: dependency: transitive description: @@ -28,7 +28,7 @@ packages: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -80,7 +80,7 @@ packages: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" path: dependency: transitive description: @@ -134,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.2" typed_data: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index d910a7c..29f3b55 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,6 +12,8 @@ dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 + firebase_core: ^1.2.1 + cloud_firestore: ^2.2.1 dev_dependencies: flutter_test: