mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Refactor colors used in the app
This commit is contained in:
parent
7a6457f870
commit
1e4e75dfb7
7 changed files with 63 additions and 17 deletions
|
|
@ -4,6 +4,7 @@ import 'package:flutter/cupertino.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
import 'package:inventree/app_colors.dart';
|
||||
|
||||
import 'package:inventree/l10.dart';
|
||||
import 'package:inventree/api_form.dart';
|
||||
|
|
@ -198,7 +199,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||
subtitle: Text("${part.description}"),
|
||||
trailing: IconButton(
|
||||
icon: FaIcon(part.starred ? FontAwesomeIcons.solidStar : FontAwesomeIcons.star,
|
||||
color: part.starred ? Color.fromRGBO(250, 250, 100, 1) : null,
|
||||
color: part.starred ? COLOR_STAR : null,
|
||||
),
|
||||
onPressed: _toggleStar,
|
||||
),
|
||||
|
|
@ -232,6 +233,29 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
|||
return tiles;
|
||||
}
|
||||
|
||||
if (!part.isActive) {
|
||||
tiles.add(
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10().inactive,
|
||||
style: TextStyle(
|
||||
color: COLOR_DANGER
|
||||
)
|
||||
),
|
||||
subtitle: Text(
|
||||
L10().inactiveDetail,
|
||||
style: TextStyle(
|
||||
color: COLOR_DANGER
|
||||
)
|
||||
),
|
||||
leading: FaIcon(
|
||||
FontAwesomeIcons.exclamationCircle,
|
||||
color: COLOR_DANGER
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Category information
|
||||
if (part.categoryName.isNotEmpty) {
|
||||
tiles.add(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue