@@ -5,15 +5,15 @@ import 'package:supabase_flutter/supabase_flutter.dart';
55/// Supabase REST-API.
66class SupabaseBrickClient extends http.BaseClient {
77 SupabaseBrickClient ({
8- required this .anonKey ,
8+ required this .supabaseAnonKey ,
99 http.Client ? innerClient,
1010 this .resourceName = 'dart.http' ,
1111 }) : _innerClient = innerClient ?? http.Client ();
1212
1313 /// The anon key of the supabase project.
1414 ///
1515 /// This is sent in the request headers as the `apikey` field.
16- final String anonKey ;
16+ final String supabaseAnonKey ;
1717
1818 /// Populates APM's "RESOURCE" column. Defaults to `dart.http` .
1919 final String resourceName;
@@ -27,12 +27,11 @@ class SupabaseBrickClient extends http.BaseClient {
2727 @override
2828 Future <http.StreamedResponse > send (http.BaseRequest request) async {
2929 // The access token is automatically refreshed by the supabase client
30- final accessToken =
31- Supabase .instance.client.auth.currentSession? .accessToken;
30+ final accessToken = Supabase .instance.client.auth.currentSession? .accessToken;
3231
3332 request.headers.addAll ({
3433 if (accessToken != null ) 'Authorization' : 'Bearer $accessToken ' ,
35- 'apikey' : anonKey ,
34+ 'apikey' : supabaseAnonKey ,
3635 'Content-Type' : 'application/json; charset=utf-8' ,
3736 // In order to use the upsert method for updates, the following header
3837 // is needed for the REST API to work correctly.
0 commit comments