mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-24 01:18:56 +00:00

* chore: reload folder * chore: reload folder * chore: init sync * chore: update tables * chore: update database * chore: load row * chore: update * chore: reload row * test: fit test * chore: retry * chore: support batch fetch * chore: enable sync * chore: sync switch * chore: sync switch * chore: migration user data * chore: migrate data * chore: migrate folder * chore: save user email * chore: refresh user profile * chore: fix test * chore: delete translation files * test: clippy format
27 lines
541 B
Dart
27 lines
541 B
Dart
import 'package:appflowy/env/env.dart';
|
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
|
|
|
import '../startup.dart';
|
|
|
|
bool isSupabaseInitialized = false;
|
|
|
|
class InitSupabaseTask extends LaunchTask {
|
|
@override
|
|
Future<void> initialize(LaunchContext context) async {
|
|
if (!isSupabaseEnable) {
|
|
return;
|
|
}
|
|
|
|
if (isSupabaseInitialized) {
|
|
return;
|
|
}
|
|
await Supabase.initialize(
|
|
url: Env.supabaseUrl,
|
|
anonKey: Env.supabaseAnonKey,
|
|
debug: false,
|
|
);
|
|
|
|
isSupabaseInitialized = true;
|
|
}
|
|
}
|