Search
 
SCRIPT & CODE EXAMPLE
 

DART

flutter firebase

1.Go to firebase and create a project.
2.Add package firebase_core , cloud_firestore , firebase_auth
(for firebase firestore database and authentication)
3.Copy Application ID in file android/app/build.gradle
4.In your project page select Android -> paste Application ID -> press Register app
5.Press Download google-services.json -> press Next
6.Bring the downloaded file to android/app
7.In section Project-level build.gradle copy classpath in dependencies, paste in 
android/build.gradle section dependencies 
8.In section App-level build.gradle copy apply plugin: 'com.google.gms.google-services',
paste in android/app/build.gradle -> press Next -> press Continue to console
9.You need to Firebase.initializeApp() before you can access database. 
You can initialize firebase in main void.

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  runApp(const MyApp());
}
10.Anjoy writing firebase :)
Comment

flutter firebase

flutter pub add flutterfire_ui
Comment

PREVIOUS NEXT
Code Example
Dart :: dart list of maps 
Dart :: flutter gray screen 
Dart :: dart callback function 
Dart :: dart list remove item by text 
Dart :: Avoid `print` calls in production code 
Dart :: strapi starters 
Dart :: change color icon tabbar flutter 
Dart :: dart async stream 
Dart :: how to color text in flutter 
Dart :: dark mode in flutter packages 
Dart :: how to run dart code in vscode 
Dart :: opendrawer without appbar 
Dart :: flutter hot reload to multiple devices 
Dart :: dart truncate 
Dart :: container vs card flutter 
Dart :: flutter wait 2 seconds 
Dart :: Flutter Rendering Widgets Using JSON Data 
Dart :: cricle in flutter 
Dart :: dart class with 
Dart :: flutter when to use methods 
Swift :: How do I check if a string contains another string in Swift 
Swift :: hide status bar ios 
Swift :: swift open settings page 
Swift :: create alert in swift 
Swift :: iOS 10.3.1 Simulator manually 
Swift :: swiftui textfield multiline 
Swift :: alert swiftui 
Swift :: and in swift7 
Swift :: define struct swift 
Swift :: get height of navigation bar swift 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =