Refactor signup page to use BLoC pattern and implement authentication repository
- Updated signup.dart to replace Provider with BLoC for state management. - Created AuthRepository to handle authentication logic and Firestore user management. - Added TripRepository and UserRepository for trip and user data management. - Implemented methods for user sign-in, sign-up, and data retrieval in repositories. - Enhanced trip management with create, update, delete, and participant management functionalities. - Updated AuthService to include new methods for sign-in and sign-up. - Removed unnecessary print statements from TripService for cleaner code. - Added dependencies for flutter_bloc and equatable in pubspec.yaml. Not tested yet
This commit is contained in:
@@ -9,7 +9,7 @@ class AuthService {
|
||||
|
||||
Stream<User?> get authStateChanges => firebaseAuth.authStateChanges();
|
||||
|
||||
Future<UserCredential> signIn({
|
||||
Future<UserCredential> signInWithEmailAndPassword({
|
||||
required String email,
|
||||
required String password
|
||||
}) async {
|
||||
@@ -17,7 +17,7 @@ class AuthService {
|
||||
email: email, password: password);
|
||||
}
|
||||
|
||||
Future<UserCredential> createAccount({
|
||||
Future<UserCredential> signUpWithEmailAndPassword({
|
||||
required String email,
|
||||
required String password
|
||||
}) async {
|
||||
@@ -100,5 +100,9 @@ class AuthService {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future signInWithApple() async {
|
||||
// TODO: Implémenter la connexion avec Apple
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user