fetchProfile method

  1. @override
Future<Map<String, dynamic>?> fetchProfile(
  1. String userId
)
override

Fetches the raw profile map for userId, or null if not found.

Implementation

@override
Future<Map<String, dynamic>?> fetchProfile(String userId) async {
  try {
    final snap = await _docRef(userId).get();
    return snap.exists ? snap.data() : null;
  } catch (error) {
    throw Exception(
      'FirebaseProfileSource.fetchProfile failed for "$userId": $error',
    );
  }
}