[pve-devel] [PATCH pve_flutter_frontend 3/3] cleanup: remove `PveConfigSwitchListTile` in favor of PveConfigListTile

Shan Shaji s.shaji at proxmox.com
Tue Sep 23 11:36:29 CEST 2025


Signed-off-by: Shan Shaji <s.shaji at proxmox.com>
---
 lib/widgets/pve_config_switch_list_tile.dart | 50 --------------------
 1 file changed, 50 deletions(-)
 delete mode 100644 lib/widgets/pve_config_switch_list_tile.dart

diff --git a/lib/widgets/pve_config_switch_list_tile.dart b/lib/widgets/pve_config_switch_list_tile.dart
deleted file mode 100644
index c209fbe..0000000
--- a/lib/widgets/pve_config_switch_list_tile.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-import 'package:flutter/material.dart';
-
-class PveConfigSwitchListTile extends StatelessWidget {
-  final bool? value;
-  final int? pending;
-  final bool? defaultValue;
-  final Widget? title;
-  final ValueChanged<bool>? onChanged;
-  final VoidCallback? onDeleted;
-
-  const PveConfigSwitchListTile({
-    super.key,
-    this.value,
-    this.pending,
-    this.defaultValue,
-    this.title,
-    this.onChanged,
-    this.onDeleted,
-  });
-  @override
-  Widget build(BuildContext context) {
-    bool? pBool;
-    if (pending != null) {
-      pBool = pending == 0 ? false : true;
-    }
-    return SwitchListTile(
-      title: _getTitle(),
-      value: pBool ?? value ?? defaultValue!,
-      onChanged: pending != null ? null : onChanged,
-    );
-  }
-
-  Widget? _getTitle() {
-    if (pending != null) {
-      return Column(
-        crossAxisAlignment: CrossAxisAlignment.start,
-        children: [
-          title!,
-          Chip(
-            label: const Text('pending'),
-            backgroundColor: Colors.red,
-            onDeleted: onDeleted,
-          )
-        ],
-      );
-    } else {
-      return title;
-    }
-  }
-}
-- 
2.47.2





More information about the pve-devel mailing list