TGService<T extends TGResponse, E extends TGError> class

Constructors

TGService(CreatorT<T> creatorT, CreatorE<E> creatorE)

Properties

creatorE CreatorE<E>
getter/setter pair
creatorT CreatorT<T>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete({required TGDeleteRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic T)?}) Future<T>
deleteSync({required TGDeleteRequest request}) Future<T>
get({required TGGetRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic T)?}) Future<T>
getSync({required TGGetRequest request}) Future<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post({required TGPostRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic T)?}) Future<T>
postSync({required TGPostRequest request}) Future<T>
put({required TGPutRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic T)?}) Future<T>
putSync({required TGPutRequest request}) Future<T>
toString() String
A string representation of this object.
inherited
upload({required TGUploadRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic T)?}) Future<T>
uploadFile({required TGUploadFileRequest request, dynamic onSuccess(dynamic T)?, dynamic onError(dynamic E)?}) Future<T>
uploadFileSync({required TGUploadFileRequest request}) Future<T>

Operators

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

Static Methods

init({required String baseUrl, Map<String, String>? headers, String? mockMappingsFile, bool applyMock = false, bool badCertificateCallbackEnabled = false, int connectionTimeoutInSeconds = 15}) → dynamic