Service<T> class
Service instance class, use this to not expose unnecesary logic
See SaAuthService for example use
- Inheritance
-
- Object
- ServiceBase<
T> - Service
Properties
- baseUrl ↔ String
-
The root url of the service, usually the url of the API
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- path ↔ String
-
The main path of the service.
getter/setter pairinherited
- requestRole ↔ String
-
Specifies for what CrudRequestRoles is this request
Defaults to CrudRequestRoles.USER
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
String path) → Future -
Make a DELETE request to a specific path
inherited
-
get(
String path) → Future< T> -
Make a GET request to a specific path
inherited
-
getToken(
) → Future< String?> -
Abstract method for getting the token (if needed)
override
-
mapper(
dynamic data) → T -
Abstract method for mapping this service's data
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String path, dynamic item) → Future< T> -
Make a POST request to a specific path with some data
inherited
-
put(
String path, dynamic item) → Future< T> -
Make a PUT request to a specific path with some data
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited