refactor
This commit is contained in:
parent
96df3168fc
commit
3453bd0b50
@ -21,6 +21,7 @@ class _MountWidgetState extends State<MountWidget> {
|
||||
child: Consumer<Mount>(
|
||||
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<MountWidget> {
|
||||
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),
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user