mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-07 20:46:56 +00:00
21 lines
620 B
Dart
21 lines
620 B
Dart
|
import 'package:selfprivacy/logic/providers/provider_settings.dart';
|
||
|
import 'package:selfprivacy/logic/providers/server_provider.dart';
|
||
|
import 'package:selfprivacy/logic/providers/server_providers/server_provider_factory.dart';
|
||
|
|
||
|
class ProvidersController {
|
||
|
static ServerProvider? get currentServerProvider => _serverProvider;
|
||
|
|
||
|
static void initServerProvider(
|
||
|
final ServerProviderSettings settings,
|
||
|
) {
|
||
|
_serverProvider =
|
||
|
ServerProviderFactory.createServerProviderInterface(settings);
|
||
|
}
|
||
|
|
||
|
static void clearProviders() {
|
||
|
_serverProvider = null;
|
||
|
}
|
||
|
|
||
|
static ServerProvider? _serverProvider;
|
||
|
}
|