copyWith method
Creates a copy of this RaliUser with optional parameter updates
Implementation
RaliUser copyWith({
String? displayName,
String? email,
String? photoURL,
Map<String, dynamic>? preferences,
List<Map<String, dynamic>>? savedDestinations,
List<String>? savedRoutes,
Timestamp? lastLogin,
}) {
return RaliUser(
uid: uid,
displayName: displayName ?? this.displayName,
email: email ?? this.email,
photoURL: photoURL ?? this.photoURL,
preferences: preferences ?? this.preferences,
savedDestinations: savedDestinations ?? this.savedDestinations,
savedRoutes: savedRoutes ?? this.savedRoutes,
createdAt: createdAt,
lastLogin: lastLogin ?? this.lastLogin,
);
}