nimbus4flutter library
This is a library for developing Flutter applications that communicate with a web server built using Project Nimbus.
It consists of the following two main functionalities
Classes
-
Api<
I, O> - A class that abstracts the server API.
-
ApiHttp<
I, O, Q extends BaseRequest, S extends BaseResponse> - A single API.
-
ApiIO<
I, O> - A single API.
- ApiRegistory
- Register and manage ApiServer and Api.
- ApiServer
- It contains information about the server with the API and its processing.
- ApiServerHttp
- It contains information about the server with the API and its processing.
- ApiServerIO
- It contains information about the server with the API and its processing.
- DataSet
- DataSet is a dynamic generic DTO.
-
FieldSchema<
T> - Define the schema for the fields in Record and RecordList.
- HttpClient
-
ParallelApi<
O> - An aggregated API that calls multiple APIs in parallel.
- QueryDataSet
- A DataSet with a query.
- QueryDataSetField
- Class that defines the field name of a DataSet with a query.
- Record
- Record is a dynamic DTO that represents a one-dimensional data structure.
- RecordList
- RecordList is a dynamic DTO that represents a two-dimensional data structure.
- RecordSchema
- Define the schema for Record.
- RequestContext
- Processing context of a request to the server.
-
SequencialApi<
I, O> - An aggregated API that calls multiple APIs in series.
- TestCase
- TestCaseStatus
- TestController
- TestControllerHttp
- TestScenario
- TestScenarioGroup
- TestScenarioGroupStatus
- TestScenarioStatus
Enums
- ApiName
- HttpMethod
- HTTP Methods enumeration.
- TestCaseState
- TestScenarioGroupState
- TestScenarioState
Constants
- immutable → const Immutable
-
Used to annotate a class
C
. Indicates thatC
and all subtypes ofC
must be immutable. - required → const Required
-
Used to annotate a named parameter
p
in a method or functionf
. Indicates that every invocation off
must include an argument corresponding top
, despite the fact thatp
would otherwise be an optional parameter.
Functions
-
loadSetting<
T> (String name, T setting) → Future< T?> -
saveSetting(
String name, Object setting) → void
Typedefs
-
ApiHttpRequestBuilder<
I, Q extends BaseRequest> = Future< void> Function(Q request, I? input, dynamic serverBuilder(BaseRequest request, I? input)) - Function to process of building HttpClientRequest, an HTTP request to the server.
-
ApiHttpResponseParser<
O, S extends BaseResponse> = Future< void> Function(S response, O? output, dynamic serverParser(BaseResponse response, O? output)) - Function to process of parsing from HttpClientResponse, an HTTP response from the server, to the output DTO.
-
ApiInOutCreator<
T> = T? Function(RequestContext context) - Function to create a DTO for input and output to an API.
-
ApiIORequestBuilder<
I> = void Function(HttpClientRequest request, I? input, dynamic serverBuilder(HttpClientRequest request, I? input)) - Function to process of building HttpClientRequest, an HTTP request to the server.
-
ApiIOResponseParser<
O> = Future< void> Function(HttpClientResponse response, O? output, dynamic serverParser(HttpClientResponse response, O? output)) - Function to process of parsing from HttpClientResponse, an HTTP response from the server, to the output DTO.
- ApiServerHttpClientBuilder = void Function(Client client)
-
ApiServerHttpRequestBuilder
= Future<
void> Function(BaseRequest request, HttpMethod method, Object? input) -
ApiServerHttpResponseParser
= Future<
void> Function(BaseResponse response, HttpMethod method, Object? output) - ApiServerIOClientBuilder = void Function(HttpClient client)
- ApiServerIORequestBuilder = void Function(HttpClientRequest request, HttpMethod method, Object? input)
-
ApiServerIOResponseParser
= Future<
void> Function(HttpClientResponse response, HttpMethod method, Object? output) - ApiServerUriBuilder = Uri Function(String scheme, String host, int? port, String path, HttpMethod method, Object? input)
-
FieldConverter<
I, O> = O? Function(DataSet? ds, Record rec, I? input) - This function is used for input conversion and output conversion of a field.
-
FieldValidator<
I> = List< String> ? Function(DataSet? ds, Record rec, I? input) - This function is used for input conversion and output conversion of a field.
-
FieldViewer<
O> = O? Function(DataSet? ds, Record rec, O? defaultValue) - This function is used for the view of a field.
-
UriBuilder<
I> = Uri Function(String scheme, String host, int? port, String path, I? input, RequestContext context, dynamic serverBuilder(String scheme, String host, int port, String path, I? input)?) - Function to create a DTO for input and output to an API.