ApiClient class

Constructors

ApiClient({String basePath = 'localhost:80/api/v1'})

Properties

basePath → String
final
customDeserializer ← Future Function(String json, String targetType, {bool growable})
no getter
defaultHeaderMap → Map<String, String>
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDefaultHeader(String key, String value) → void
override
characteristicsToMap(List<QualifiedCharacteristic> characteristics) → Map<String, QualifiedCharacteristic>
Creates a Map of the characteristics from a List<Characteristic> based on their UUID.
deserialize(String json, String targetType, {bool growable = false}) → dynamic
deserializeAsync(String json, String targetType, {bool growable = false}) → Future
override
getStatusCode(Uint8List codes) → BleStatusCode
Returns a BleStatusCode object that contains the int status code of the response
headersToString(Map<String, dynamic> headers) → String
Format the Map of headers into a String.
invokeAPI(String path, String method, List<QueryParam> queryParams, Object? body, Map<String, String> headerParams, Map<String, String> formParams, String? contentType) → Future<Response>
Implementation of invokeAPI method, representing an adapter that transforms the request from the classic HTTP request to a BLE request
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readBinaryCharacteristic(QualifiedCharacteristic characteristic) → Future<List<int>?>
readCharacteristic(QualifiedCharacteristic characteristic) → Future<String?>
Reads a Characteristic of a Service
serialize(Object? value) → String
serializeAsync(Object? value) → Future<String>
override
stringToHeaders(String str) → Map<String, String>
Creates a Map of headers from a String.
subscribeToCharacteristic(QualifiedCharacteristic characteristic) → Stream<List<int>>
Writes a Characteristic of a Service
toString() → String
A string representation of this object.
inherited
writeBinaryCharacteristicWithResponse(QualifiedCharacteristic characteristic, Uint8List bytes) → Future<void>
Writes a Characteristic of a Service
writeCharacteristicWithoutResponse(QualifiedCharacteristic characteristic, dynamic value) → Future<void>
Writes a Characteristic of a Service
writeCharacteristicWithResponse(QualifiedCharacteristic characteristic, dynamic value) → Future<void>
Writes a Characteristic of a Service

Operators

operator ==(Object other) → bool
The equality operator.
inherited