-
Notifications
You must be signed in to change notification settings - Fork 0
/
Assignment_6.txt
30 lines (26 loc) · 1.04 KB
/
Assignment_6.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
For connecting Firebase with our app we will have to follow certain steps:
add below in dependencies section in your pubsec.yaml file and run "flutter pub get":
cloud_firestore: ^4.15.10
firebase_auth: ^4.18.0
firebase_core: ^2.27.2
google_sign_in: ^6.2.1
After doing so run command "flutterfire configure"
and create the firebase project
Above step will install all nessacary api key as connection for you
now add below code into the main.dart:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
Platform.isWindows
? await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: "AIzaSyD7G8WlPkIwu_XUVC_QMKsGVlj_TB5nxJY",
appId: "1:616198733019:web:06fd69859fec9b801160fe",
messagingSenderId: "616198733019",
projectId: 'assignment-6-22dcf',
authDomain: 'assignment-6-22dcf.firebaseapp.com',
storageBucket: 'assignment-6-22dcf.appspot.com',
measurementId: 'G-2542J9QEYZ',
))
: await Firebase.initializeApp();
runApp(const MyApp());
}