data_repositories library

Classes

AbsResponse<T>
BaseOptions
The common config for the Dio instance. dio.options is a instance of BaseOptions
Body
Use this annotation on a service method param when you want to directly control the request body of a POST/PUT request (instead of sending in as request parameters or form-style request body).
CacheControl
Callback
Callback class that can be attached to the Floor builder.
CancelRequest
CancelToken
You can cancel a request by using a cancel token. One token can be shared with different requests. when a token's cancel method invoked, all requests with this token will be cancelled.
CcEntities
ColumnInfo
Allows customization of the column associated with this field.
DaoBase<T>
Database
Marks a class as a FloorDatabase.
DatabaseView
Marks a class as a database view (a fixed select statement).
DataModel<T>
DataRepository
DataResponse<T, U extends AbsResponse<T>>
DataSource
DefaultTransformer
DELETE
Make a DELETE request
DeletionAdapter<T>
Dio
A powerful Http client for Dart, which supports Interceptors, Global configuration, FormData, File downloading etc. and Dio is very easy to use.
DioMixin
DioOptions
DioResponseType
DynamicConverter
Entity
Marks a class as a database entity (table).
ErrorInterceptorHandler
Handler for error interceptor.
Extra
Extra data that will be passed to dio's request, response, transformer and interceptors.
Field
Named pair for a form request.
FloorDatabase
Extend this class to enable database functionality.
ForeignKey
Declares a foreign key on another Entity.
FormData
A class to create readable "multipart/form-data" streams. It can be used to submit forms and file uploads to http server.
FormUrlEncoded
Denotes that the request body will use form URL encoding. Fields should be declared as parameters and annotated with Field.
Fts3
Marks an Entity annotated class as an FTS3 entity. This class will have a mapping SQLite FTS3 table in the database.
Fts4
Marks an Entity annotated class as an FTS4 entity. This class will have a mapping SQLite FTS4 table in the database.
FtsTokenizer
Available option values that can be used with Fts3 & Fts4.
Replaces the header with the value of its target.
Headers
Headerss
Adds headers specified in the value map.
HttpClientAdapter
HttpAdapter is a bridge between Dio and HttpClient.
HttpMethod
A holder that includes all http methods which are supported by retrofit.
HttpResponse<T>
Index
Declares an index on an Entity. see: SQLite Index Documentation
Insert
Marks a method as an insert method.
InsertionAdapter<T>
Interceptor
Dio instance may have interceptor(s) by which you can intercept requests/responses/errors before they are handled by then or catchError. See also:
Interceptors
Interceptors are a queue, and you can add any number of interceptors, All interceptors will be executed in first in first out order.
InterceptorsWrapper
InterceptorsWrapper is a helper class, which is used to conveniently create interceptor(s). See also:
ListConverter
ListParam<T>
Local
LocalEntity
Lock
Add lock/unlock API for interceptors.
LogInterceptor
LogInterceptor is used to print logs during network requests. It's better to add LogInterceptor to the tail of the interceptor queue, otherwise the changes made in the interceptor behind A will not be printed out. This is because the execution of interceptors is in the order of addition.
Method
Migration
Base class for a database migration.
MigrationAdapter
MultiPart
Denotes that the request body is multi-part. Parts should be declared as parameters and annotated with Part.
MultipartFile
A file to be uploaded as part of a MultipartRequest. This doesn't need to correspond to a physical file.
NoBody
Use this annotation on a service method param when you want to indicate that no body should be generated for POST/PUT/DELETE requests.
OPTIONS
Make a HEAD request Make a OPTIONS request
Options
Every request can pass an Options object which will be merged with Dio.options
PagingConfig
Part
Denotes a single part of a multi-part request. Part parameters may not be null.
PATCH
Make a GET request
Path
Named replacement in a URL path segment.
PrimaryKey
Marks a field in an Entity as the primary key.
PUT
Make a PUT request
Queries
Query parameter keys and values appended to the URL.
Query
Query parameter appended to the URL.
QueryAdapter
This class knows how to execute database queries.
QuerySql
Marks a method as a query method.
QueuedInterceptor
Serialize the request/response/error before they enter the interceptor.
QueuedInterceptorsWrapper
QueuedInterceptorsWrapper is a helper class, which is used to conveniently create QueuedInterceptor(s). See also:
ReceiveProgress
RedirectRecord
Remote
RequestInterceptorHandler
Handler for request interceptor.
RequestOptions
Response<T>
Response describes the http Response info.
ResponseBody
ResponseInterceptorHandler
Handler for response interceptor.
RestApi
Define an API.
SendProgress
Transformer
Transformer allows changes to the request/response data before it is sent/received to/from the server.
TypeConverter<T, S>
Base class for type converters which can be applied to:
TypeConverters
Specifies additional type converters that Floor can use. The TypeConverter is added to the scope of the element so if you put it on a class, all methods/fields in that class will be able to use the converter.
Update
Marks a method as an update method.
UpdateAdapter<T>

Enums

DataSourceType
DataType
DioErrorType
Execute
ForeignKeyAction
Constants definition for values that can be used in ForeignKey.onDelete and ForeignKey.onUpdate
ListFormat
ListFormat specifies the array format (a single parameter with multiple parameter or multiple parameters with the same name) and the separator for array items.
OnConflictStrategy
Set of conflict handling strategies for insert and update methods.
Parser
Define how to parse response json If you want to support more, PR is welcome
ResponseType
ResponseType indicates which transformation should be automatically applied to the response data by Dio.
Status

Mixins

OptionsMixin

Extensions

DatabaseFactoryExtension on DatabaseFactory

Constants

dao → const _Dao
Marks the class as a Data Access Object.
delete → const _Delete
Marks a method as a deletion method.
entity → const Entity
Marks a class as a database entity (table).
fts3 → const Fts3
Marks an Entity annotated class as an FTS3 entity. This class will have a mapping SQLite FTS3 table in the database.
fts4 → const Fts4
Marks an Entity annotated class as an FTS4 entity. This class will have a mapping SQLite FTS4 table in the database.
ignore → const _Ignore
Ignores the marked element from Floor's processing logic. It can only be applied to entity's fields.
insert → const Insert
Marks a method as an insert method.
primaryKey → const PrimaryKey
Marks a field in an Entity as the primary key.
transaction → const _Transaction
Marks a method as a transaction method.
update → const Update
Marks a method as an update method.

Properties

sqfliteDatabaseFactory → DatabaseFactory
final

Typedefs

HeaderForEachCallback = void Function(String name, List<String> values)
InterceptorErrorCallback = void Function(DioError e, ErrorInterceptorHandler handler)
InterceptorSendCallback = void Function(RequestOptions options, RequestInterceptorHandler handler)
InterceptorSuccessCallback = void Function(Response e, ResponseInterceptorHandler handler)
JsonDecodeCallback = dynamic Function(String)
The default Transformer for Dio. If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the DefaultTransformer by setting the dio.Transformer.
ProgressCallback = void Function(int count, int total)
Callback to listen the progress for sending/receiving data.
RequestEncoder = List<int> Function(String request, RequestOptions options)
ResponseDecoder = String Function(List<int> responseBytes, RequestOptions options, ResponseBody responseBody)
ValidateStatus = bool Function(int? status)

Exceptions / Errors

DioError
DioError describes the error info when request failed.