diff --git a/bu_passport/lib/auth/auth_gate.dart b/bu_passport/lib/auth/auth_gate.dart index 0f539f6..66f9ede 100644 --- a/bu_passport/lib/auth/auth_gate.dart +++ b/bu_passport/lib/auth/auth_gate.dart @@ -10,8 +10,6 @@ class AuthGate extends StatelessWidget { return StreamBuilder( stream: FirebaseAuth.instance.authStateChanges(), builder: (context, snapshot) { - print(FirebaseAuth.instance.authStateChanges()); - if (snapshot.connectionState == ConnectionState.waiting) { // Show a loading indicator while waiting for the authentication state return CircularProgressIndicator(); diff --git a/bu_passport/lib/pages/calendar_page.dart b/bu_passport/lib/pages/calendar_page.dart index 37139d7..5880211 100644 --- a/bu_passport/lib/pages/calendar_page.dart +++ b/bu_passport/lib/pages/calendar_page.dart @@ -80,7 +80,6 @@ class _CalendarPageState extends State { // Filter events for the selected day List selectedEvents = firebaseService.fetchEventsForDay(_selectedDay, events); - print('Selected events: $selectedEvents'); return Column( children: [ TableCalendar( diff --git a/bu_passport/lib/pages/event_page.dart b/bu_passport/lib/pages/event_page.dart index ca5faf8..cb368ab 100644 --- a/bu_passport/lib/pages/event_page.dart +++ b/bu_passport/lib/pages/event_page.dart @@ -99,8 +99,6 @@ class _EventPageState extends State { // User's current location final currentPosition = await Geolocator.getCurrentPosition( desiredAccuracy: LocationAccuracy.high); - print("Event coords: $eventCoords"); - print("Current position: $currentPosition"); // Calculate the distance between event to user final double distance = Geolocator.distanceBetween( @@ -109,7 +107,6 @@ class _EventPageState extends State { eventCoords['lat'], eventCoords['lng'], ); - print("Distance: $distance meters"); // Distance radius checking if (distance <= 400) { diff --git a/bu_passport/lib/pages/profile_page.dart b/bu_passport/lib/pages/profile_page.dart index bbf8164..1811aaf 100644 --- a/bu_passport/lib/pages/profile_page.dart +++ b/bu_passport/lib/pages/profile_page.dart @@ -28,13 +28,15 @@ class _ProfilePageState extends State List attendedEvents = []; List userSavedEvents = []; bool isLoading = true; // Indicates if the page is currently loading data. - FirebaseService firebaseService = - FirebaseService(db: FirebaseFirestore.instance); // Firebase service instance for database operations. + FirebaseService firebaseService = FirebaseService( + db: FirebaseFirestore + .instance); // Firebase service instance for database operations. final TextEditingController _firstNameController = TextEditingController(); final TextEditingController _lastNameController = TextEditingController(); File? selectedImageFile; // The file for a selected profile image. - bool _isEditing = false; // Flag to check if the user is editing their profile. + bool _isEditing = + false; // Flag to check if the user is editing their profile. final ImageService _imageService = ImageService(); String? userProfileImageUrl; // URL for the user's profile image. @@ -58,7 +60,8 @@ class _ProfilePageState extends State User? finalUser = FirebaseAuth.instance.currentUser; late TabController _tabController; // Controller for managing tabs. - late Future _userProfileFuture; // Future for retrieving user data from Firestore. + late Future + _userProfileFuture; // Future for retrieving user data from Firestore. @override void initState() { @@ -166,8 +169,6 @@ class _ProfilePageState extends State double verticalMargin = screenHeight * 0.01; // 1% of screen height double horizontalMargin = screenWidth * 0.035; // 2% of screen width - print(events); - if (events.isEmpty) { return Center(child: Text(message, style: TextStyle(fontSize: 20))); } else { diff --git a/bu_passport/lib/services/firebase_service.dart b/bu_passport/lib/services/firebase_service.dart index 798d286..2ff75cd 100644 --- a/bu_passport/lib/services/firebase_service.dart +++ b/bu_passport/lib/services/firebase_service.dart @@ -69,9 +69,7 @@ class FirebaseService { await this.db.collection('users').doc(userUID).get(); if (snapshot.exists) { - print('Snapshot exists'); final userData = snapshot.data() as Map; - print('User Data: $userData'); // Print userData to see its contents Users user = Users( firstName: userData['firstName'], @@ -86,7 +84,6 @@ class FirebaseService { userSavedEvents: Map.from(userData['userSavedEvents'] ?? {}), ); - print(user); return user; } else { print('Snapshot does not exist'); @@ -112,7 +109,6 @@ class FirebaseService { await this.db.collection('events').doc(eventId).update({ 'savedUsers': FieldValue.arrayUnion([userUID]), }); - print("Event saved successfully"); } catch (error) { print("Failed to save event: $error"); } @@ -132,7 +128,6 @@ class FirebaseService { await this.db.collection('events').doc(eventId).update({ 'savedUsers': FieldValue.arrayRemove([userUID]), }); - print("Event unsaving successful"); } catch (error) { print("Failed to unsave event: $error"); } @@ -145,7 +140,6 @@ class FirebaseService { if (userDocSnapshot.exists) { final userData = userDocSnapshot.data() as Map; - print(userData['userSavedEvents']); if (userData['userSavedEvents'] is Map) { Map savedEvents = userData['userSavedEvents'] != null ? Map.from(userData['userSavedEvents']) @@ -189,7 +183,6 @@ class FirebaseService { bool isCheckedIn = entry.value; Event? event = await fetchEventById(eventId); - print(event?.eventTitle); if (event != null) { DateTime startOfDayEvent = DateTime(event.eventStartTime.year, event.eventStartTime.month, event.eventStartTime.day); @@ -286,7 +279,6 @@ class FirebaseService { await userDoc.update({ 'userProfileURL': profileURL, }); - print("Profile URL updated successfully"); } catch (error) { print("Failed to update profile URL: $error"); } @@ -336,7 +328,6 @@ class FirebaseService { await this.db.collection('users').get(); snapshot.docs.forEach((doc) { final userData = doc.data(); - print(userData); Users user = Users( firstName: userData['firstName'], lastName: userData['lastName'],