Compare commits

..

No commits in common. "43280b2913c2ee3800f43ebdf634e527abdcd9f7" and "96df3168fcb59dfcf69bd47247314ace35277fc5" have entirely different histories.

2 changed files with 10 additions and 29 deletions

View File

@ -17,7 +17,7 @@ class MyApp extends StatelessWidget {
return MaterialApp( return MaterialApp(
title: constants.app_title, title: constants.app_title,
theme: ThemeData( theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue), colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange),
), ),
home: const MyHomePage(title: constants.app_title), home: const MyHomePage(title: constants.app_title),
); );

View File

@ -20,42 +20,23 @@ class _MountWidgetState extends State<MountWidget> {
return Card( return Card(
child: Consumer<Mount>( child: Consumer<Mount>(
builder: (context, mount, widget) { builder: (context, mount, widget) {
final textColor = Colors.blue; final isThreeLine = mount.state == Icons.toggle_on;
final subTextColor = Colors.black;
final isActive = mount.state == Icons.toggle_on;
final nameText = Text(
formatMountName(mount.type, mount.name),
style: TextStyle(color: subTextColor),
);
return ListTile( return ListTile(
isThreeLine: isActive, isThreeLine: isThreeLine,
leading: IconButton( leading: const Icon(Icons.settings),
icon: Icon(Icons.settings, color: textColor),
onPressed: () {},
),
subtitle: subtitle:
isActive isThreeLine
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
nameText, Text(formatMountName(mount.type, mount.name)),
Text(mount.path, style: TextStyle(color: subTextColor)), Text(mount.path),
], ],
) )
: nameText, : Text(formatMountName(mount.type, mount.name)),
title: Text( title: Text(initialCaps(mount.type)),
initialCaps(mount.type), trailing: Icon(mount.state),
style: TextStyle(color: textColor, fontWeight: FontWeight.bold),
),
trailing: IconButton(
icon: Icon(
mount.state,
color: isActive ? Colors.blue : Colors.grey,
),
onPressed: () {},
),
); );
}, },
), ),