make text selectable
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-03-01 16:34:47 -06:00
parent 43280b2913
commit 7d1574d042
2 changed files with 7 additions and 5 deletions

View File

@ -9,10 +9,9 @@ class MountConfig {
final String _type;
MountConfig({required name, required type}) : _name = name, _type = type;
UnmodifiableMapView get settings => UnmodifiableMapView(_settings);
String get name => _name;
String get path => _path;
UnmodifiableMapView get settings => UnmodifiableMapView(_settings);
IconData get state => _state;
String get type => _type;

View File

@ -24,7 +24,7 @@ class _MountWidgetState extends State<MountWidget> {
final subTextColor = Colors.black;
final isActive = mount.state == Icons.toggle_on;
final nameText = Text(
final nameText = SelectableText(
formatMountName(mount.type, mount.name),
style: TextStyle(color: subTextColor),
);
@ -41,11 +41,14 @@ class _MountWidgetState extends State<MountWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
nameText,
Text(mount.path, style: TextStyle(color: subTextColor)),
SelectableText(
mount.path,
style: TextStyle(color: subTextColor),
),
],
)
: nameText,
title: Text(
title: SelectableText(
initialCaps(mount.type),
style: TextStyle(color: textColor, fontWeight: FontWeight.bold),
),