1 import 'package:flutter/material.dart';
2 import 'package:proxmox_login_manager/proxmox_general_settings_model.dart';
4 class ProxmoxGeneralSettingsForm extends StatefulWidget {
6 _ProxmoxGeneralSettingsFormState createState() =>
7 _ProxmoxGeneralSettingsFormState();
10 class _ProxmoxGeneralSettingsFormState
11 extends State<ProxmoxGeneralSettingsForm> {
12 Future<ProxmoxGeneralSettingsModel>? _settings;
16 _settings = ProxmoxGeneralSettingsModel.fromLocalStorage();
20 Widget build(BuildContext context) {
23 title: const Text('Settings'),
25 body: FutureBuilder<ProxmoxGeneralSettingsModel>(
27 builder: (context, snaptshot) {
28 if (snaptshot.hasData) {
29 final settings = snaptshot.data!;
30 return SingleChildScrollView(
34 title: const Text('Validate SSL connections'),
35 subtitle: const Text('e.g. validates certificates'),
36 value: settings.sslValidation!,
37 onChanged: (value) async {
39 .rebuild((b) => b.sslValidation = value)
43 ProxmoxGeneralSettingsModel.fromLocalStorage();
53 child: CircularProgressIndicator(),