RaliUser class

///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////

Constructors

RaliUser.new({required String uid, required String displayName, required String email, String? photoURL, Map<String, dynamic>? preferences, List<Map<String, dynamic>>? savedDestinations, List<String>? savedRoutes, Timestamp? createdAt, Timestamp? lastLogin})
//////////// ////////////
RaliUser.fromFirebaseUser(dynamic firebaseUser)
Creates a RaliUser from a Firebase Auth user
factory
RaliUser.fromMap(Map<String, dynamic> map, String uid)
//////////// //////////// Creates a RaliUser from a Firestore document map
factory

Properties

createdAt → Timestamp
final
displayName → String
final
email → String
final
hashCode → int
The hash code for this object.
no setterinherited
lastLogin → Timestamp
final
photoURL → String?
final
preferences → Map<String, dynamic>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
savedDestinations → List<Map<String, dynamic>>
final
savedRoutes → List<String>
final
uid → String
//////////// ////////////
final

Methods

addDestination(Map<String, dynamic> destination) → RaliUser
//////////// //////////// Adds a destination to savedDestinations
addRoute(String routeId) → RaliUser
Adds a route to savedRoutes
copyWith({String? displayName, String? email, String? photoURL, Map<String, dynamic>? preferences, List<Map<String, dynamic>>? savedDestinations, List<String>? savedRoutes, Timestamp? lastLogin}) → RaliUser
Creates a copy of this RaliUser with optional parameter updates
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeDestination(String destinationName) → RaliUser
Removes a destination by name
removeRoute(String routeId) → RaliUser
Removes a route from savedRoutes
toMap() → Map<String, dynamic>
//////////// //////////// Converts RaliUser to a map for Firestore
toString() → String
A string representation of this object.
inherited
updatePreferences(Map<String, dynamic> newPrefs) → RaliUser
//////////// //////////// Updates user preferences

Operators

operator ==(Object other) → bool
The equality operator.
inherited