PostgrestClient constructor
PostgrestClient(})
To create a PostgrestClient, you need to provide an url endpoint.
You can also provide custom headers
and _schema
if needed
PostgrestClient(REST_URL)
PostgrestClient(REST_URL, headers: {'apikey': 'foo'})
httpClient is optional and can be used to provide a custom http client
isolate
is optional and can be used to provide a custom isolate, which is used for heavy json computation
Implementation
PostgrestClient(
this.url, {
Map<String, String>? headers,
String? schema,
this.httpClient,
YAJsonIsolate? isolate,
}) : _schema = schema,
headers = {...defaultHeaders, if (headers != null) ...headers},
_isolate = isolate ?? (YAJsonIsolate()..initialize()),
_hasCustomIsolate = isolate != null;