diff --git a/supabase-ws-flutter-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata b/supabase-ws-flutter-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..21a3cc1
--- /dev/null
+++ b/supabase-ws-flutter-mobile/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/supabase-ws-flutter-mobile/lib/core/di/app_providers_module.dart b/supabase-ws-flutter-mobile/lib/core/di/app_providers_module.dart
index a4e5d6b..90511a0 100644
--- a/supabase-ws-flutter-mobile/lib/core/di/app_providers_module.dart
+++ b/supabase-ws-flutter-mobile/lib/core/di/app_providers_module.dart
@@ -1,9 +1,8 @@
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
-import 'package:flutter_template/core/common/config.dart';
+import 'package:flutter_template/core/source/common/local_shared_preferences_storage.dart';
+import 'package:flutter_template/main.dart';
import 'package:get_it/get_it.dart';
import 'package:shared_preferences/shared_preferences.dart';
-import 'package:flutter_template/core/source/common/local_shared_preferences_storage.dart';
-import 'package:supabase_flutter/supabase_flutter.dart';
class AppProvidersModule {
AppProvidersModule._privateConstructor();
@@ -21,7 +20,7 @@ class AppProvidersModule {
extension _GetItDiModuleExtensions on GetIt {
void _setupModule() {
- registerSingletonAsync(_initSupabase);
+ registerSingletonAsync(initSupabase);
registerLazySingleton(FlutterSecureStorage.new);
registerSingletonAsync(() => SharedPreferences.getInstance());
@@ -33,9 +32,3 @@ extension _GetItDiModuleExtensions on GetIt {
);
}
}
-
-//TODO: Discuss where we should initialize it
-Future _initSupabase() => Supabase.initialize(
- url: Config.apiBaseUrl,
- anonKey: Config.supabaseApiKey,
- ).then((supabase) => supabase.client);
diff --git a/supabase-ws-flutter-mobile/lib/main.dart b/supabase-ws-flutter-mobile/lib/main.dart
index 4246d67..ead4c3c 100644
--- a/supabase-ws-flutter-mobile/lib/main.dart
+++ b/supabase-ws-flutter-mobile/lib/main.dart
@@ -7,6 +7,14 @@ import 'package:flutter_template/core/common/config.dart';
import 'package:flutter_template/core/common/logger.dart';
import 'package:flutter_template/core/di/di_provider.dart';
import 'package:flutter_template/ui/main/main_screen.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+// This should be initialized in `AppProvidersModule` but it's here just for
+// the example.
+Future initSupabase() => Supabase.initialize(
+ url: Config.apiBaseUrl,
+ anonKey: Config.supabaseApiKey,
+ ).then((supabase) => supabase.client);
Future main() async {
await runZonedGuarded(