Add explicit TUN and SOCKS5 connection modes, app routing controls, authenticated per-session local SOCKS5, Android network monitoring, persistent haptics, resilient session recovery, notification hardening and client-side Hivemind cleanup. Keep the hosted flutter_vless_android 1.1.5 runtime as the base and apply the Android compatibility/security patches at build time instead of restoring the unstable vendored runtime.
67 lines
2.0 KiB
Dart
67 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:revoltvpn/logic/app_colors.dart';
|
|
import 'package:revoltvpn/logic/connection_settings.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/app_routing.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/connection_mode.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/haptic.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/lightning.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/rain.dart';
|
|
import 'package:revoltvpn/screens/settings/in_settings/resilience.dart';
|
|
|
|
class SettingsScreen extends StatefulWidget {
|
|
const SettingsScreen({super.key});
|
|
|
|
@override
|
|
State<SettingsScreen> createState() => _SettingsScreenState();
|
|
}
|
|
|
|
class _SettingsScreenState extends State<SettingsScreen> {
|
|
ConnectionMode _mode = ConnectionSettings.mode;
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
_loadMode();
|
|
}
|
|
|
|
Future<void> _loadMode() async {
|
|
await ConnectionSettings.initialize();
|
|
if (mounted) setState(() => _mode = ConnectionSettings.mode);
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: AppColors.bgDeep,
|
|
appBar: AppBar(
|
|
backgroundColor: AppColors.bgSurface,
|
|
elevation: 0,
|
|
leading: IconButton(
|
|
icon: const Icon(Icons.arrow_back, color: AppColors.textWhite),
|
|
onPressed: () => Navigator.of(context).pop(),
|
|
),
|
|
title: const Text(
|
|
'Settings',
|
|
style: TextStyle(
|
|
color: AppColors.textWhite,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
),
|
|
body: ListView(
|
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
|
children: [
|
|
ConnectionModeTile(
|
|
onChanged: (mode) => setState(() => _mode = mode),
|
|
),
|
|
const ResilienceModeTile(),
|
|
AppRoutingTile(connectionMode: _mode),
|
|
const HapticFeedbackTile(),
|
|
const RainToggleTile(),
|
|
const LightningToggleTile(),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|