27 lines
711 B
Dart
27 lines
711 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
import '../../backend/api.dart';
|
|
import 'fkm_bridge.dart';
|
|
|
|
/// FKM is disabled in IKAR, including preferences from previous releases.
|
|
class FkmController {
|
|
FkmController._();
|
|
static final FkmController instance = FkmController._();
|
|
|
|
final ValueNotifier<bool> enabled = ValueNotifier(false);
|
|
bool get isSupported => false;
|
|
|
|
Future<void> init(Api api) async {
|
|
enabled.value = false;
|
|
await FkmBridge.instance.setEnabled(false);
|
|
}
|
|
|
|
Future<bool> setEnabled(bool value) async {
|
|
await FkmBridge.instance.setEnabled(false);
|
|
enabled.value = false;
|
|
return !value;
|
|
}
|
|
|
|
Future<void> showIncomingCall(Map<dynamic, dynamic> payload) async {}
|
|
}
|