DataSync class

Constructors

DataSync.new({String baseApiUrl = "", String token = ""})

Properties

baseApiUrl String
getter/setter pair
custom DataSyncCustom
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
token String
getter/setter pair

Methods

delete<T, K>({required BuildContext context, required K fromJson(Map<String, dynamic> map, int statusCode), required String url, Map<String, dynamic>? data, bool externalRequest = false, K hasData(Response response)?, Function? hasDataMiddleware, List<String> jsonKeyHierarchy = const [], bool printData = false, bool usingFormData = false, bool showToastAlert = true}) Future<K>
index<T>({required BuildContext context, required T fromJson(Map<String, dynamic> map), required String url, HttpMethods method = HttpMethods.get, List<RequestParam>? requestParams, Map<String, dynamic>? data, bool externalRequest = false, List<T> hasData(Response response)?, bool printData = false, bool printFinalURL = false, List<String> jsonKeyHierarchy = const [], bool showToastAlert = true, bool usingFormData = false}) Future<List<T>>
initCustom() DataSyncCustom
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
post<T, K>({required BuildContext context, required K fromJson(Map<String, dynamic> map, int statusCode), required String url, Map<String, dynamic>? data, bool externalRequest = false, K hasData(Response response)?, Function? hasDataMiddleware, List<String> jsonKeyHierarchy = const [], bool printData = false, bool usingFormData = false, bool showToastAlert = true}) Future<K>
put<T, K>({required BuildContext context, required K fromJson(Map<String, dynamic> map, int statusCode), required String url, Map<String, dynamic>? data, bool externalRequest = false, K hasData(Response response)?, Function? hasDataMiddleware, List<String> jsonKeyHierarchy = const [], bool printData = false, bool usingFormData = false, bool showToastAlert = true}) Future<K>
show<T>({required BuildContext context, required T fromJson(Map<String, dynamic> map), required String url, HttpMethods method = HttpMethods.get, List<RequestParam>? requestParams, Map<String, dynamic>? data, bool externalRequest = false, T hasData(Response response)?, bool printData = false, List<String> jsonKeyHierarchy = const [], bool showToastAlert = true, bool usingFormData = false}) Future<T>
toString() String
A string representation of this object.
inherited

Operators

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