extract<T> method

T? extract<T>(
  1. T? extractor(
    1. UserInfo
    )
)

Implementation

T? extract<T>(T? Function(UserInfo) extractor) =>
    extractor(UserInfo.fromJson({
      "uid": user.uid,
      "email": user.email,
      "displayName": user.displayName,
      "photoUrl": user.photoURL,
      "phoneNumber": user.phoneNumber,
      "isAnonymous": user.isAnonymous,
      "isEmailVerified": user.emailVerified,
      "providerId": user.providerData.first.providerId,
      "tenantId": user.tenantId,
      "refreshToken": user.refreshToken,
      "creationTimestamp": user.metadata.creationTime?.millisecondsSinceEpoch,
      "lastSignInTimestamp":
          user.metadata.lastSignInTime?.millisecondsSinceEpoch,
    })) ??
    user.providerData.map(extractor).whereType<T>().firstOrNull;