From 3453bd0b5010810612b5dfbe73e1443c5535c475 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Sat, 1 Mar 2025 15:51:55 -0600 Subject: [PATCH] refactor --- web/repertory/lib/widgets/mount_widget.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/repertory/lib/widgets/mount_widget.dart b/web/repertory/lib/widgets/mount_widget.dart index 98455cc8..81b1277a 100644 --- a/web/repertory/lib/widgets/mount_widget.dart +++ b/web/repertory/lib/widgets/mount_widget.dart @@ -21,6 +21,7 @@ class _MountWidgetState extends State { child: Consumer( builder: (context, mount, widget) { final isThreeLine = mount.state == Icons.toggle_on; + final nameText = Text(formatMountName(mount.type, mount.name)); return ListTile( isThreeLine: isThreeLine, @@ -29,12 +30,9 @@ class _MountWidgetState extends State { isThreeLine ? Column( crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(formatMountName(mount.type, mount.name)), - Text(mount.path), - ], + children: [nameText, Text(mount.path)], ) - : Text(formatMountName(mount.type, mount.name)), + : nameText, title: Text(initialCaps(mount.type)), trailing: Icon(mount.state), );