feat: api2.oneme.ru с корнем Минцифры; kolibri с pub.dev вместо сабмодуля

This commit is contained in:
klockky
2026-08-06 11:03:50 +03:00
parent a46ee7234c
commit ed33f53c6a
18 changed files with 135 additions and 20 deletions
+12
View File
@@ -1,8 +1,20 @@
import 'package:kolibri/kolibri.dart' show setTrustMincifryCa;
import 'package:shared_preferences/shared_preferences.dart';
import '../config/config.dart';
abstract class TlsConfig {
static const String prefKey = 'dev_tls_insecure';
static Future<void> applyMincifryTrust() async {
final prefs = await SharedPreferences.getInstance();
setTrustMincifryCa(
enabled:
prefs.getBool(ServerConfig.prefTrustMincifryKey) ??
ServerConfig.defaultTrustMincifryCa,
);
}
static Future<bool> isInsecureAllowed() async {
final prefs = await SharedPreferences.getInstance();
return prefs.getBool(prefKey) ?? false;