mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-22 00:17:49 +00:00

* feat: implement magic link login * ci: create env file * ci: generate flutter env files * ci: disable inject env * chore: update table name * Update frontend/appflowy_flutter/lib/env/env.dart Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com> * chore: fix compile --------- Co-authored-by: Mathias Mogensen <42929161+Xazin@users.noreply.github.com>
28 lines
583 B
Dart
28 lines
583 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 (!isSupabaseEnabled) {
|
|
return;
|
|
}
|
|
|
|
if (isSupabaseInitialized) {
|
|
return;
|
|
}
|
|
await Supabase.initialize(
|
|
url: Env.supabaseUrl,
|
|
anonKey: Env.supabaseAnonKey,
|
|
debug: true,
|
|
// authFlowType: AuthFlowType.pkce,
|
|
);
|
|
|
|
isSupabaseInitialized = true;
|
|
}
|
|
}
|