mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Allow "trailing" widget to be displayed on home screen entries
This commit is contained in:
parent
bb73fb7400
commit
2e7abf8a1e
1 changed files with 3 additions and 2 deletions
|
|
@ -192,7 +192,7 @@ class _InvenTreeHomePageState extends State<InvenTreeHomePage> {
|
|||
}
|
||||
|
||||
|
||||
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<InvenTreeHomePage> {
|
|||
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<InvenTreeHomePage> {
|
|||
FontAwesomeIcons.shapes,
|
||||
callback: () {
|
||||
_showParts(context);
|
||||
}
|
||||
},
|
||||
));
|
||||
|
||||
// Starred parts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue