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:
@@ -1,26 +0,0 @@
|
||||
class Group {
|
||||
final String? id;
|
||||
final String name;
|
||||
final List<String> members;
|
||||
|
||||
Group({
|
||||
this.id,
|
||||
required this.name,
|
||||
required this.members,
|
||||
});
|
||||
|
||||
factory Group.fromMap(Map<String, dynamic> data, String documentId) {
|
||||
return Group(
|
||||
id: documentId,
|
||||
name: data['name'] ?? '',
|
||||
members: List<String>.from(data['members'] ?? []),
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toMap() {
|
||||
return {
|
||||
'name': name,
|
||||
'members': members,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user