From 2e7abf8a1ee824c6d0b30097039c252e84d14a64 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 6 Jul 2022 21:21:19 +1000 Subject: [PATCH] Allow "trailing" widget to be displayed on home screen entries --- lib/widget/home.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/widget/home.dart b/lib/widget/home.dart index 19f1c953..0870b02c 100644 --- a/lib/widget/home.dart +++ b/lib/widget/home.dart @@ -192,7 +192,7 @@ class _InvenTreeHomePageState extends State { } - Widget _listTile(BuildContext context, String label, IconData icon, {Function()? callback, String role = "", String permission = ""}) { + Widget _listTile(BuildContext context, String label, IconData icon, {Function()? callback, String role = "", String permission = "", Widget? trailing}) { bool connected = InvenTreeAPI().isConnected(); @@ -211,6 +211,7 @@ class _InvenTreeHomePageState extends State { child: ListTile( leading: FaIcon(icon, color: connected && allowed ? COLOR_CLICK : Colors.grey), title: Text(label), + trailing: trailing, ), ), onTap: () { @@ -257,7 +258,7 @@ class _InvenTreeHomePageState extends State { FontAwesomeIcons.shapes, callback: () { _showParts(context); - } + }, )); // Starred parts