Group Chat Learn Flutter Firebase + Clean Architecture – Part 11 (Flutter Tutorial)

Table of Contents

Welcome to the Group Chat Flutter with firebase + Clean Architecture course. We are going to build Group Chat App with Firebase + Clean architecture proposed by Robert C. Martin (Uncle Bob). You'll learn how to write clean, structured and most importantly bug-free code. Having a proper architecture is extremely critical as soon as your project grows to a substantial size. Whenever you are building an app with a UI, you should design the UI and UX first.

				
					@override
  Future<void> googleAuth() async{
    final GoogleSignInAccount? account = await googleSignIn.signIn();
    final GoogleSignInAuthentication googleAuth = await account!.authentication;

     final authCredential= GoogleAuthProvider.credential(idToken: googleAuth.idToken,accessToken: googleAuth.accessToken);

    final userInformation=(await auth.signInWithCredential(authCredential)).user;
    getCreateCurrentUser(
      UserEntity(
        name: userInformation!.displayName,
        email: userInformation.email,
        gender: "",
        dob: "",
        phoneNumber: userInformation.phoneNumber,
        profileUrl: userInformation.photoURL,
        status: "",
        isOnline: false,
      ),
    );



  }
				
			
				
					  @override
  Future<void> getCreateCurrentUser(UserEntity user) async{
    final userCollection = fireStore.collection("users");

    final uid= await getCurrentUserId();

    userCollection.doc(uid).get().then((userDoc) {


      final newUser=UserModel(
        gender:user.gender,
        isOnline: user.isOnline,
        name: user.name,
        phoneNumber: user.phoneNumber,
        profileUrl: user.profileUrl,
        status: user.status,
        email: user.email,
        dob: user.dob,
        uid: uid,
      ).toDocument();


      if (!userDoc.exists){

        userCollection.doc(uid).set(newUser);

      }
      return;

    });


  }
				
			

💼 Business Inquiries: etechviral@gmail.com

💼 Business Inquiries: amirk3321@gmail.com

►Support Us: ►

what you will learn? 1. Firebase setup (android, IOS) 2. Firebase auth + Google Auth 3. Firebase firestore (crud operation) and complex data 4. Clean maintainable code 5. Clean archtecture (TDD) pattern 6. Clean UI 7. Dependency Injection 8. Flutter Bloc/Cubit state management pattern 9. Create New Group, Chat with group 10. bug-free code 11. Exception Handling .. (eTechviral)

Share on facebook
Share
Share on twitter
Tweet
Share on linkedin
Share
Share on whatsapp
Share
Share on email
Send

Leave a Reply