import 'package:cloud_firestore/cloud_firestore.dart'; class LoggedInUser { final String name; final num totalPoints; dynamic weeklyPlace; final String sharedId; final Timestamp lastChallengeDate; final GeoPoint address; LoggedInUser({ required this.name, required this.totalPoints, required this.weeklyPlace, required this.sharedId, required this.lastChallengeDate, required this.address, }); factory LoggedInUser.fromMap(Map map) { return LoggedInUser( name: map["name"], totalPoints: map["total_points"], weeklyPlace: map["weekly_place"], sharedId: map["shared_id"], lastChallengeDate: map["last_challenge_date"], address: map["address"], ); } }