toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'id': id,
    'username': username,
    'biography': bio,
    'imageUrl': imageUrl,
    'level': level.level,
    'exp': level.exp,
    'lives': lives,
    'coins': coins,
    'streakDays': streakDays.map((e) => e.toIso8601String()).toList(),
  };
}