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:
@ -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(
|
||||
|
Reference in New Issue
Block a user