AdminService class
The service that handles the Admin APIs.
Usually shouldn't be initialized manually and instead PocketBase.admins should be used.
- Inheritance
-
- Object
- BaseCrudService<
AdminModel> - AdminService
Constructors
- AdminService(PocketBase client)
Properties
- baseCrudPath → String
-
The base url path that is used by the service.
no setteroverride
- client → PocketBase
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authWithPassword(
String email, String password, {Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<AdminAuth> - Authenticate an admin account by its email and password and returns a new auth token and admin data.
-
confirmPasswordReset(
String passwordResetToken, String password, String passwordConfirm, {Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<void> - Confirms admin password reset request.
-
create(
{Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, List<MultipartFile> files = const [], Map<String, String> headers = const {}, String? expand, String? fields}) → Future<AdminModel> -
Creates a new item.
inherited
-
delete(
String id, {Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<void> -
Deletes a single admin model by its id.
override
-
getFirstListItem(
String filter, {String? expand, String? fields, Map< String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<AdminModel> -
Returns the first found list item by the specified filter.
inherited
-
getFullList(
{int batch = 500, String? expand, String? filter, String? sort, String? fields, Map< String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<List< AdminModel> > -
Returns a list with all items batch fetched at once.
inherited
-
getList(
{int page = 1, int perPage = 30, bool skipTotal = false, String? expand, String? filter, String? sort, String? fields, Map< String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<ResultList< AdminModel> > -
Returns paginated items list.
inherited
-
getOne(
String id, {String? expand, String? fields, Map< String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<AdminModel> -
Returns single item by its id.
inherited
-
itemFactoryFunc(
Map< String, dynamic> json) → AdminModel -
The factory function (eg.
fromJson()
) that will be used to decode the returned items from the crud endpoints.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
{Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<AdminAuth> - Refreshes the current admin authenticated instance and returns a new auth token and admin data.
-
requestPasswordReset(
String email, {Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, Map<String, String> headers = const {}}) → Future<void> - Sends admin password reset request.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
String id, {Map< String, dynamic> body = const {}, Map<String, dynamic> query = const {}, List<MultipartFile> files = const [], Map<String, String> headers = const {}, String? expand, String? fields}) → Future<AdminModel> -
Updates a single admin model by its id.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited