class User { const User({ required this.id, required this.email, required this.name, required this.role, }); final String id; final String email; final String name; final String role; factory User.fromJson(Map json) { return User( id: json['id'] as String, email: json['email'] as String, name: json['name'] as String, role: json['role'] as String? ?? 'coach', ); } Map toJson() => { 'id': id, 'email': email, 'name': name, 'role': role, }; } class AuthTokens { const AuthTokens({ required this.accessToken, required this.refreshToken, }); final String accessToken; final String refreshToken; factory AuthTokens.fromJson(Map json) { return AuthTokens( accessToken: json['access_token'] as String, refreshToken: json['refresh_token'] as String, ); } }