From 23de275e1160124ca5f522cf8c6272358e880502 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 15 Mar 2025 22:18:42 -0500 Subject: [PATCH] remote mount provider support --- web/repertory/lib/models/mount.dart | 2 +- web/repertory/lib/widgets/mount_list_widget.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web/repertory/lib/models/mount.dart b/web/repertory/lib/models/mount.dart index ad683584..c348cbcb 100644 --- a/web/repertory/lib/models/mount.dart +++ b/web/repertory/lib/models/mount.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; -import 'package:repertory/constants.dart' as constants; import 'package:repertory/helpers.dart'; import 'package:repertory/models/mount_list.dart'; import 'package:repertory/types/mount_config.dart'; @@ -18,6 +17,7 @@ class Mount with ChangeNotifier { } String? get bucket => mountConfig.bucket; + String get id => '${type}_$name'; String get name => mountConfig.name; String get path => mountConfig.path; IconData? get state => mountConfig.state; diff --git a/web/repertory/lib/widgets/mount_list_widget.dart b/web/repertory/lib/widgets/mount_list_widget.dart index 385478a4..25a5ae4f 100644 --- a/web/repertory/lib/widgets/mount_list_widget.dart +++ b/web/repertory/lib/widgets/mount_list_widget.dart @@ -15,6 +15,7 @@ class MountListWidget extends StatelessWidget { itemBuilder: (context, idx) { return ChangeNotifierProvider( create: (context) => mountList.items[idx], + key: ValueKey(mountList.items[idx].id), child: Padding( padding: EdgeInsets.only( bottom: @@ -22,7 +23,7 @@ class MountListWidget extends StatelessWidget { ? 0.0 : constants.padding, ), - child: const MountWidget(), + child: MountWidget(), ), ); },