galaxeus_lib library

Classes

Args
BaseClient
The abstract base class for an HTTP client.
BaseRequest
The base class for HTTP requests.
BaseResponse
The base class for HTTP responses.
BaseResponseWithUrl
A BaseResponse with a url field.
ByteStream
A stream of chunks of bytes representing a single piece of data.
Captcha
CaptchaResult
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
Crypto
dart
DeviceId
Event
Event class. This is send back to the subscriber when an event is triggered, Subscriber can use the instance to retrieve the event data and other event related parameters. eventName is a mandatory parameter and will represent the current event.
EventEmitter
This class provides necessary implementations for subscribing and cancelling the event subscriptions and publishing events to the subcribers.
FetchOption
JsonDataScript
JsonDatasScript
JsonScheme
return original data json
LanguageDetailData
Listener
Listener is one who listen for specific event. Listener register for notification with EventEmitter Once the listener is registered, a Listener interface is returned back to the caller. Caller can use this Listener interface to cancel the registration or check the state.
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
OperatingSystem
Request
An HTTP request where the entire request body is known in advance.
Response
An HTTP response where the entire response body is known in advance.
StreamedRequest
An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent.
StreamedResponse
An HTTP response where the response body is received asynchronously after the headers have been received.
TcpSocketClient
TcpSocketServer
WebSocketClient

Properties

languageCodeDetailData Map<String, LanguageDetailData>
getter/setter pair
languageCodeJson Map<String, Map>
getter/setter pair
languageCodeNames List<String>
getter/setter pair

Functions

convertToAgo(int? timestamp) String
convertToAgoFromDateTime(DateTime dateTime) String
createOffset({required int totalCount, required int limitCount}) → (List<int>, int)
delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL.
fetch(String url, {FetchOption? options, Encoding? encoding}) Future<Response>
generateUuid(int length, {String text = "0123456789abcdefghijklmnopqrstuvwxyz"}) String
get(Uri url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL.
getDeviceId({bool isGetProductId = false}) DeviceId?
getRandomElement<T>(List<T> list) → T
getUuid(int length, {String? text}) String
getRandom uuid for parameters @extra
Sends an HTTP HEAD request with the given headers to the given URL.
jsonEach({required Map data, required Future builder(dynamic key, dynamic value, bool isList, bool isMapInList)}) Future<Map>
jsonListEach({required String key, required List data, required Future builder(dynamic key, dynamic value, bool isList, bool isMapInList)}) Future<List>
jsonToDart(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment, bool isStatic = true}) JsonDataScript
jsonToDartDynamic(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment}) String
jsonToDartStatic(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment}) String
jsonToIsar(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment}) JsonDataScript
jsonToIsarDynamic(Map<String, dynamic> data, {String className = "Root", bool isMain = true, bool isUseClassName = false, String? comment}) String
jsonToLanguageScript({required Map language_raw, required String default_language_code_id, required Directory directory, required Future<String?> onData(String origin_data, String language_code_id, String default_language_code_id), bool is_translate = true}) Future<Directory>
jsonToMessage(Map data, {bool isHtml = false, required Map jsonFullMedia, bool isRoot = true, String space = ""}) String
jsonToScripts(List<Map> scripts_origin, {String? comment, bool isMethodApi = true, required Directory directory, String path_package_json_dart = "import \"json_dart.dart\";", int try_loop = 2}) Future<Directory>
jsonToScriptStatic(Map<String, dynamic> data, {bool isMethodApi = true, String? comment, required Directory directory, String path_package_json_dart = "import \"json_dart.dart\";"}) String
jsonUpdate({required Map data, required Map newData}) Map
languageMapToStringScript({required String key_name, required Map data, required String language_parameter, bool is_translate = true, required String default_language_code_id, required String base_name, required Future<String?> onData(String origin_data, String language_code_id, String default_language_code_id)}) Future<String>
patch(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers and body to the given URL.
post(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given URL.
put(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given URL.
read(Uri url, {Map<String, String>? headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a String.
readBytes(Uri url, {Map<String, String>? headers}) Future<Uint8List>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.
runWithClient<R>(R body(), Client clientFactory(), {ZoneSpecification? zoneSpecification}) → R
Runs body in its own Zone with the Client returned by clientFactory set as the default Client.
textToFunction({required String key, required String returnType, required String className, bool isClass = false, bool isList = false, bool isUseClassName = false, String? comment, required void paramFunction(String text), required void paramJson(String text)}) String
textToFunctionDart({required String key, required dynamic value, required String returnType, required String className, bool isClass = false, bool isList = false, String? comment, required void paramFunction(String text), required void paramJson(String text)}) String
textToFunctionDynamic({required String key, required String returnType, required String className, bool isClass = false, bool isList = false, bool isUseClassName = false, String? comment, required void callback(String text), required void paramFunction(String text), required void paramJson(String text)}) String
textToFunctionIsar({required String key, required dynamic value, required String returnType, required String className, bool isClass = false, bool isList = false, bool isUseClassName = false, String? comment, required void callback(String text), required void paramFunction(String text), required void paramJson(String text), required void operatorData(String text)}) String
textToListFunction({required String key, required String returnType, required String className, bool isClass = false, bool isList = false, String? comment, required void paramFunction(String text), required void paramJson(String text)}) String

Typedefs

CancelEvent = void Function()
Handler for cancelling the event registration.
EventCallback = void Function(Event ev, Object? context)
The callback function to receive event notification. ev - Event event emitted by the publisher. context - Object passed while registering the subscription as context. This is useful especially when the listener want to receive context information for all future events emitted for the context.

Exceptions / Errors

ClientException
An exception caused by an error in a pkg/http client.