Signed-off-by: Shan Shaji <[email protected]>
---
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
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel