-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathchart_theme.dart
More file actions
237 lines (152 loc) · 6.56 KB
/
chart_theme.dart
File metadata and controls
237 lines (152 loc) · 6.56 KB
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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
// ignore_for_file: public_member_api_docs
import 'package:deriv_chart/deriv_chart.dart';
import 'package:deriv_chart/src/theme/painting_styles/bar_style.dart';
import 'package:deriv_chart/src/theme/painting_styles/entry_spot_style.dart';
import 'package:flutter/material.dart';
/// An interface for the Chart's theme.
///
/// Any app which wants to define the chart's theme should pass an
/// implementation of this interface.
abstract class ChartTheme {
Color get backgroundColor;
GridStyle get gridStyle;
TextStyle get currentSpotTextStyle;
Color get gridLineColor;
Color get gridTextColor;
TextStyle get gridTextStyle;
Color get areaLineColor;
double get areaLineThickness;
Color get areaGradientStart;
Color get areaGradientEnd;
Color get candleBullishBodyDefault;
Color get candleBullishBodyActive;
Color get candleBullishWickDefault;
Color get candleBullishWickActive;
Color get candleBearishBodyDefault;
Color get candleBearishBodyActive;
Color get candleBearishWickDefault;
Color get candleBearishWickActive;
Color get currentSpotContainerColor;
Color get currentSpotDotColor;
Color get currentSpotDotEffect;
Color get currentSpotLineColor;
Color get currentSpotTextColor;
Color get crosshairLineDesktopColor;
Color get crosshairLineResponsiveUpperLineGradientStart;
Color get crosshairLineResponsiveUpperLineGradientEnd;
Color get crosshairLineResponsiveLowerLineGradientStart;
Color get crosshairLineResponsiveLowerLineGradientEnd;
Color get crosshairInformationBoxTextDefault;
Color get crosshairInformationBoxTextSubtle;
Color get crosshairInformationBoxTextStatic;
Color get crosshairInformationBoxTextProfit;
Color get crosshairInformationBoxTextLoss;
Color get crosshairInformationBoxContainerNormalColor;
Color get crosshairInformationBoxContainerGlassColor;
double get crosshairInformationBoxContainerGlassBackgroundBlur;
TextStyle get crosshairInformationBoxTitleStyle;
TextStyle get crosshairInformationBoxQuoteStyle;
TextStyle get crosshairInformationBoxTimeLabelStyle;
TextStyle get crosshairAxisLabelStyle;
Color get floatingMenuContainerGlassColor;
Color get floatingMenuDragIconColor;
Color get lineThicknessDropdownButtonTextColor;
TextStyle get lineThicknessDropdownButtonTextStyle;
Color get lineThicknessDropdownItemSelectedBackgroundColor;
Color get lineThicknessDropdownItemSelectedTextColor;
Color get lineThicknessDropdownItemUnselectedTextColor;
Color get lineThicknessDropdownItemSelectedLineColor;
Color get lineThicknessDropdownItemUnselectedLineColor;
TextStyle get lineThicknessDropdownItemTextStyle;
/// The style of the current tick indicator.
HorizontalBarrierStyle get currentSpotStyle;
String get fontFamily;
double get margin04Chart;
double get margin08Chart;
double get margin12Chart;
double get margin16Chart;
double get margin24Chart;
double get margin32Chart;
double get borderRadius04Chart;
double get borderRadius08Chart;
double get borderRadius16Chart;
double get borderRadius24Chart;
TextStyle get caption2;
TextStyle get subheading;
TextStyle get body2;
TextStyle get body1;
TextStyle get title;
TextStyle get overLine;
/// The painting styles of candlestick chart.
CandleStyle get candleStyle;
/// The painting styles of histogram bar.
BarStyle get barStyle;
/// The painting styles of line chart.
LineStyle get lineStyle;
/// The painting styles of markers.
MarkerStyle get markerStyle;
/// The painting styles of accumulators entry spot.
EntrySpotStyle get entrySpotStyle;
/// The painting styles horizontal barriers.
HorizontalBarrierStyle get horizontalBarrierStyle;
/// The painting styles vertical barriers.
VerticalBarrierStyle get verticalBarrierStyle;
/// The style of text is generated by calling this function.
///
/// The [textStyle] argument must not be null, and if null is passed, an
/// ArgumentError will be thrown.
///
/// The [color] may be null or un-passed, in that case, a default value will
/// be assigned to it.
TextStyle textStyle({
required TextStyle textStyle,
Color? color,
});
/// This is a legacy method to get the legacy base01 color.
/// It is used for backward compatibility with older versions of the chart.
/// It should not be used in new code, as it'll be removed soon.
// TODO(Jim): Remove this method when an alternative is available.
Color get base01Color;
/// This is a legacy method to get the legacy base03 color.
/// It is used for backward compatibility with older versions of the chart.
/// It should not be used in new code, as it'll be removed soon.
// TODO(Jim): Remove this method when an alternative is available.
Color get base03Color;
/// This is a legacy method to get the legacy base04 color.
/// It is used for backward compatibility with older versions of the chart.
/// It should not be used in new code, as it'll be removed soon.
// TODO(Jim): Remove this method when an alternative is available.
Color get base04Color;
/// This is a legacy method to get the legacy base05 color.
/// It is used for backward compatibility with older versions of the chart.
/// It should not be used in new code, as it'll be removed soon.
// TODO(Jim): Remove this method when an alternative is available.
Color get base05Color;
/// This is a legacy method to get the legacy base07 color.
/// It is used for backward compatibility with older versions of the chart.
/// It should not be used in new code, as it'll be removed soon.
// TODO(Jim): Remove this method when an alternative is available.
Color get base07Color;
/// Toolbar color palette colors for the color picker grid
Color get toolbarColorPaletteIconRed;
Color get toolbarColorPaletteIconYellow;
Color get toolbarColorPaletteIconMustard;
Color get toolbarColorPaletteIconGreen;
Color get toolbarColorPaletteIconSeaWater;
Color get toolbarColorPaletteIconBlue;
Color get toolbarColorPaletteIconSapphire;
Color get toolbarColorPaletteIconBlueBerry;
Color get toolbarColorPaletteIconGrape;
Color get toolbarColorPaletteIconMagenta;
Color get toolbarColorPaletteIconBorderColor;
Color get toolbarColorPaletteIconSelectedBorderColor;
Color get closedMarkerSurfaceColorGreen;
Color get closedMarkerBorderColorGreen;
Color get closedMarkerTextIconColorGreen;
Color get closedMarkerSurfaceColorRed;
Color get closedMarkerBorderColorRed;
Color get closedMarkerTextIconColorRed;
TextStyle get profitAndLossLabelTextStyle;
Color get markerPaletteTextIconColor;
Color get markerPaletteBorderColor;
}