provider property

Provider<UsersDataService> provider
getter/setter pair

Creates a new admin user and assign a typesense key to that user's claims

Implementation

// Future<void> createAdminUser(CreateAdminVO admin) {
//   try {
//     final callable = _functions.httpsCallable('callables-createAdminUser');
//     return callable.call(admin.toJson());
//   } on FirebaseFunctionsException catch (e) {
//     // Handling FirebaseFunctionsException
//     throw UsersServiceException(
//       model: CarvError()
//         ..message = e.message ?? ''
//         ..details = e.stackTrace?.toString() ?? ''
//         ..code = CarvError_CarvCode.Internal,
//     );
//   } catch (e) {
//     throw UsersServiceException(
//       model: CarvError()
//         ..message = e.toString()
//         ..code = CarvError_CarvCode.Internal,
//     );
//   }
// }

static Provider<UsersDataService> provider =
    Provider<UsersDataService>((ref) {
  final workspaceService = UsersDataService(
    ref.watch(fbFirestoreProvider),
    //   ref.watch(fbFunctionsProvider),
  );
  return workspaceService;
});