1+ import 'enums.dart';
12import 'client_stub.dart'
23 if (dart.library.html) 'client_browser.dart'
34 if (dart.library.io) 'client_io.dart';
4- import 'enums.dart';
55import 'response.dart';
66import 'upload_progress.dart';
77
88abstract class Client {
9- static const int CHUNK_SIZE = 5 * 1024 * 1024;
9+ static const int CHUNK_SIZE = 5* 1024* 1024;
1010 late Map<String , String > config;
1111 late String _endPoint;
1212 late String? _endPointRealtime;
1313
1414 String get endPoint => _endPoint;
1515 String? get endPointRealtime => _endPointRealtime;
1616
17- factory Client({
18- String endPoint = '{{ spec .endpoint }}',
19- bool selfSigned = false,
20- }) =>
17+ factory Client(
18+ {String endPoint = '{{ spec .endpoint }}',
19+ bool selfSigned = false}) =>
2120 createClient(endPoint: endPoint, selfSigned: selfSigned);
2221
2322 Future webAuth(Uri url, {String? callbackUrlScheme});
@@ -39,34 +38,17 @@ abstract class Client {
3938
4039{% for header in spec .global .headers %}
4140{% if header .description %}
42- /// {{header .description }}
41+ /// {{header .description }}
4342{% endif %}
4443 Client set{{header .key | caseUcfirst }}(value);
4544{% endfor %}
4645
4746 Client addHeader(String key, String value);
4847
49- Future<Response > call(
50- HttpMethod method, {
48+ Future<Response > call(HttpMethod method, {
5149 String path = '',
5250 Map<String , String > headers = const {},
5351 Map<String , dynamic > params = const {},
5452 ResponseType? responseType,
55- String cacheModel = '',
56- String cacheKey = '',
57- String cacheResponseIdKey = '',
58- String cacheResponseContainerKey = '',
59- Map<String , Object ?>? previous,
60- });
61-
62- Future<Client > setOfflinePersistency({
63- bool status = true,
64- void Function(Object)? onWriteQueueError,
6553 });
66-
67- bool getOfflinePersistency();
68-
69- Client setOfflineCacheSize(int kbytes);
70-
71- int getOfflineCacheSize();
7254}
0 commit comments