-
Notifications
You must be signed in to change notification settings - Fork 558
/
Copy pathcolors.dart
157 lines (129 loc) · 4.55 KB
/
colors.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// Flutter imports:
import 'package:flutter/material.dart';
// Project imports:
import 'constants.dart';
import 'data/models/static/color_theme_model.dart';
class InvoiceStatusColors {
InvoiceStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kInvoiceStatusDraft: _colorTheme!.colorLightGray,
kInvoiceStatusSent: _colorTheme!.colorInfo,
kInvoiceStatusPartial: _colorTheme!.colorPrimary,
kInvoiceStatusPaid: _colorTheme!.colorSuccess,
kInvoiceStatusPastDue: _colorTheme!.colorDanger,
kInvoiceStatusCancelled: _colorTheme!.colorDarkGray,
kInvoiceStatusReversed: _colorTheme!.colorDarkGray,
kInvoiceStatusViewed: _colorTheme!.colorWarning,
kInvoiceStatusBounced: _colorTheme!.colorDanger,
};
}
}
class RecurringInvoiceStatusColors {
RecurringInvoiceStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kRecurringInvoiceStatusDraft: _colorTheme!.colorLightGray,
kRecurringInvoiceStatusActive: _colorTheme!.colorSuccess,
kRecurringInvoiceStatusPaused: _colorTheme!.colorDarkGray,
kRecurringInvoiceStatusCompleted: _colorTheme!.colorInfo,
kRecurringInvoiceStatusPending: _colorTheme!.colorPrimary,
};
}
}
class CreditStatusColors {
CreditStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kCreditStatusDraft: _colorTheme!.colorLightGray,
kCreditStatusSent: _colorTheme!.colorInfo,
kCreditStatusPartial: _colorTheme!.colorPrimary,
kCreditStatusApplied: _colorTheme!.colorSuccess,
kCreditStatusViewed: _colorTheme!.colorWarning,
kCreditStatusBounced: _colorTheme!.colorDanger,
};
}
}
class PurchaseOrderStatusColors {
PurchaseOrderStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kPurchaseOrderStatusDraft: _colorTheme!.colorLightGray,
kPurchaseOrderStatusSent: _colorTheme!.colorInfo,
kPurchaseOrderStatusAccepted: _colorTheme!.colorPrimary,
kPurchaseOrderStatusReceived: _colorTheme!.colorSuccess,
kPurchaseOrderStatusCancelled: _colorTheme!.colorDanger,
kPurchaseOrderStatusViewed: _colorTheme!.colorWarning,
kPurchaseOrderStatusBounced: _colorTheme!.colorDanger,
};
}
}
class TransactionStatusColors {
TransactionStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kTransactionStatusUnmatched: _colorTheme!.colorInfo,
kTransactionStatusMatched: _colorTheme!.colorPrimary,
kTransactionStatusConverted: _colorTheme!.colorSuccess,
};
}
}
class QuoteStatusColors {
QuoteStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kQuoteStatusDraft: _colorTheme!.colorLightGray,
kQuoteStatusSent: _colorTheme!.colorInfo,
kQuoteStatusApproved: _colorTheme!.colorPrimary,
kQuoteStatusConverted: _colorTheme!.colorSuccess,
kQuoteStatusExpired: _colorTheme!.colorDanger,
kQuoteStatusViewed: _colorTheme!.colorWarning,
kQuoteStatusBounced: _colorTheme!.colorDanger,
};
}
}
class PaymentStatusColors {
PaymentStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kPaymentStatusPending: _colorTheme!.colorLightGray,
kPaymentStatusCancelled: _colorTheme!.colorDarkGray,
kPaymentStatusFailed: _colorTheme!.colorDanger,
kPaymentStatusCompleted: _colorTheme!.colorSuccess,
kPaymentStatusPartiallyRefunded: _colorTheme!.colorPrimary,
kPaymentStatusRefunded: _colorTheme!.colorDarkGray,
kPaymentStatusUnapplied: _colorTheme!.colorInfo,
kPaymentStatusPartiallyUnapplied: _colorTheme!.colorInfo,
};
}
}
class ExpenseStatusColors {
ExpenseStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kExpenseStatusLogged: _colorTheme!.colorLightGray,
kExpenseStatusPending: _colorTheme!.colorPrimary,
kExpenseStatusInvoiced: _colorTheme!.colorSuccess,
kExpenseStatusPaid: _colorTheme!.colorInfo,
};
}
}
class TaskStatusColors {
TaskStatusColors(this._colorTheme);
final ColorTheme? _colorTheme;
Map<String, Color?> get colors {
return {
kTaskStatusLogged: _colorTheme!.colorLightGray,
kTaskStatusRunning: _colorTheme!.colorPrimary,
kTaskStatusInvoiced: _colorTheme!.colorSuccess,
};
}
}