2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 10:15:32 +00:00

Refactor colors used in the app

This commit is contained in:
Oliver
2021-07-23 12:57:56 +10:00
parent 7a6457f870
commit 1e4e75dfb7
7 changed files with 63 additions and 17 deletions

View File

@ -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(