Create management portal in Flutter #39
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-03-04 19:45:43 -06:00
parent e9d65bb566
commit e35f43af97
3 changed files with 7 additions and 4 deletions

View File

@ -5,6 +5,7 @@ import 'package:repertory/constants.dart' as constants;
import 'package:repertory/helpers.dart';
import 'package:repertory/models/mount.dart';
import 'package:repertory/models/mount_list.dart';
import 'package:repertory/types/mount_config.dart';
import 'package:repertory/widgets/add_mount_widget.dart';
import 'package:repertory/widgets/mount_list_widget.dart';
import 'package:repertory/widgets/mount_settings.dart';
@ -103,7 +104,8 @@ class _MyHomePageState extends State<MyHomePage> {
return AddMountWidget(
allowEncrypt:
mountList.items.firstWhereOrNull(
(item) => item.type == "encrypt",
(MountConfig item) =>
item.type.toLowerCase() == "encrypt",
) ==
null,
mountType: _mountType,

View File

@ -13,7 +13,8 @@ class MountList with ChangeNotifier {
List<MountConfig> _mountList = [];
UnmodifiableListView get items => UnmodifiableListView(_mountList);
UnmodifiableListView<MountConfig> get items =>
UnmodifiableListView<MountConfig>(_mountList);
Future<void> _fetch() async {
final response = await http.get(

View File

@ -72,7 +72,7 @@ class _AddMountWidgetState extends State<AddMountWidget> {
],
),
const SizedBox(height: 10),
if (_mountType != 'Encrypt')
if (_mountType?.toLowerCase() != 'encrypt')
Text(
'Configuration Name',
textAlign: TextAlign.left,
@ -81,7 +81,7 @@ class _AddMountWidgetState extends State<AddMountWidget> {
fontWeight: FontWeight.bold,
),
),
if (_mountType != 'Encrypt')
if (_mountType?.toLowerCase() != 'encrypt')
TextField(
autofocus: true,
decoration: InputDecoration(),