@@ -34,104 +34,103 @@ import 'statically_provided_ticks.dart';
34
34
35
35
List <GalleryScaffold > buildGallery () {
36
36
return [
37
- new GalleryScaffold (
38
- listTileIcon: new Icon (Icons .insert_chart),
37
+ GalleryScaffold (
38
+ listTileIcon: const Icon (Icons .insert_chart),
39
39
title: 'Bar chart with Secondary Measure Axis' ,
40
40
subtitle: 'Bar chart with a series using a secondary measure axis' ,
41
- childBuilder: () => new BarChartWithSecondaryAxis .withRandomData (),
41
+ childBuilder: () => BarChartWithSecondaryAxis .withRandomData (),
42
42
),
43
- new GalleryScaffold (
44
- listTileIcon: new Icon (Icons .insert_chart),
43
+ GalleryScaffold (
44
+ listTileIcon: const Icon (Icons .insert_chart),
45
45
title: 'Bar chart with Secondary Measure Axis only' ,
46
46
subtitle: 'Bar chart with both series using secondary measure axis' ,
47
- childBuilder: () => new BarChartWithSecondaryAxisOnly .withRandomData (),
47
+ childBuilder: () => BarChartWithSecondaryAxisOnly .withRandomData (),
48
48
),
49
- new GalleryScaffold (
50
- listTileIcon: new Transform .rotate (
51
- angle: 1.5708 , child: new Icon (Icons .insert_chart)),
49
+ GalleryScaffold (
50
+ listTileIcon: Transform .rotate (
51
+ angle: 1.5708 , child: const Icon (Icons .insert_chart)),
52
52
title: 'Horizontal bar chart with Secondary Measure Axis' ,
53
53
subtitle:
54
54
'Horizontal Bar chart with a series using secondary measure axis' ,
55
- childBuilder: () =>
56
- new HorizontalBarChartWithSecondaryAxis .withRandomData (),
55
+ childBuilder: () => HorizontalBarChartWithSecondaryAxis .withRandomData (),
57
56
),
58
- new GalleryScaffold (
59
- listTileIcon: new Icon (Icons .insert_chart),
57
+ GalleryScaffold (
58
+ listTileIcon: const Icon (Icons .insert_chart),
60
59
title: 'Short Ticks Axis' ,
61
60
subtitle: 'Bar chart with the primary measure axis having short ticks' ,
62
- childBuilder: () => new ShortTickLengthAxis .withRandomData (),
61
+ childBuilder: () => ShortTickLengthAxis .withRandomData (),
63
62
),
64
- new GalleryScaffold (
65
- listTileIcon: new Icon (Icons .insert_chart),
63
+ GalleryScaffold (
64
+ listTileIcon: const Icon (Icons .insert_chart),
66
65
title: 'Custom Axis Fonts' ,
67
66
subtitle: 'Bar chart with custom axis font size and color' ,
68
- childBuilder: () => new CustomFontSizeAndColor .withRandomData (),
67
+ childBuilder: () => CustomFontSizeAndColor .withRandomData (),
69
68
),
70
- new GalleryScaffold (
71
- listTileIcon: new Icon (Icons .insert_chart),
69
+ GalleryScaffold (
70
+ listTileIcon: const Icon (Icons .insert_chart),
72
71
title: 'Label Alignment Axis' ,
73
72
subtitle: 'Bar chart with custom measure axis label alignments' ,
74
- childBuilder: () => new MeasureAxisLabelAlignment .withRandomData (),
73
+ childBuilder: () => MeasureAxisLabelAlignment .withRandomData (),
75
74
),
76
- new GalleryScaffold (
77
- listTileIcon: new Icon (Icons .insert_chart),
75
+ GalleryScaffold (
76
+ listTileIcon: const Icon (Icons .insert_chart),
78
77
title: 'No Axis' ,
79
78
subtitle: 'Bar chart with only the axis line drawn' ,
80
- childBuilder: () => new HiddenTicksAndLabelsAxis .withRandomData (),
79
+ childBuilder: () => HiddenTicksAndLabelsAxis .withRandomData (),
81
80
),
82
- new GalleryScaffold (
83
- listTileIcon: new Icon (Icons .insert_chart),
81
+ GalleryScaffold (
82
+ listTileIcon: const Icon (Icons .insert_chart),
84
83
title: 'Statically Provided Ticks' ,
85
84
subtitle: 'Bar chart with statically provided ticks' ,
86
- childBuilder: () => new StaticallyProvidedTicks .withRandomData (),
85
+ childBuilder: () => StaticallyProvidedTicks .withRandomData (),
87
86
),
88
- new GalleryScaffold (
89
- listTileIcon: new Icon (Icons .show_chart),
87
+ GalleryScaffold (
88
+ listTileIcon: const Icon (Icons .show_chart),
90
89
title: 'Custom Formatter' ,
91
90
subtitle: 'Timeseries with custom domain and measure tick formatters' ,
92
- childBuilder: () => new CustomAxisTickFormatters .withRandomData (),
91
+ childBuilder: () => CustomAxisTickFormatters .withRandomData (),
93
92
),
94
- new GalleryScaffold (
95
- listTileIcon: new Icon (Icons .show_chart),
93
+ GalleryScaffold (
94
+ listTileIcon: const Icon (Icons .show_chart),
96
95
title: 'Custom Tick Count' ,
97
96
subtitle: 'Timeseries with custom measure axis tick count' ,
98
- childBuilder: () => new CustomMeasureTickCount .withRandomData (),
97
+ childBuilder: () => CustomMeasureTickCount .withRandomData (),
99
98
),
100
- new GalleryScaffold (
101
- listTileIcon: new Icon (Icons .show_chart),
99
+ GalleryScaffold (
100
+ listTileIcon: const Icon (Icons .show_chart),
102
101
title: 'Integer Measure Ticks' ,
103
102
subtitle: 'Timeseries with only whole number measure axis ticks' ,
104
- childBuilder: () => new IntegerOnlyMeasureAxis .withRandomData (),
103
+ childBuilder: () => IntegerOnlyMeasureAxis .withRandomData (),
105
104
),
106
- new GalleryScaffold (
107
- listTileIcon: new Icon (Icons .show_chart),
105
+ GalleryScaffold (
106
+ listTileIcon: const Icon (Icons .show_chart),
108
107
title: 'Non-zero bound Axis' ,
109
108
subtitle: 'Timeseries with measure axis that does not include zero' ,
110
- childBuilder: () => new NonzeroBoundMeasureAxis .withRandomData (),
109
+ childBuilder: () => NonzeroBoundMeasureAxis .withRandomData (),
111
110
),
112
- new GalleryScaffold (
113
- listTileIcon: new Icon (Icons .insert_chart),
111
+ GalleryScaffold (
112
+ listTileIcon: const Icon (Icons .insert_chart),
114
113
title: 'Ordinal axis with initial viewport' ,
115
114
subtitle: 'Single series with initial viewport' ,
116
- childBuilder: () => new OrdinalInitialViewport .withRandomData (),
115
+ childBuilder: () => OrdinalInitialViewport .withRandomData (),
117
116
),
118
- new GalleryScaffold (
119
- listTileIcon: new Icon (Icons .show_chart),
117
+ GalleryScaffold (
118
+ listTileIcon: const Icon (Icons .show_chart),
120
119
title: 'Numeric axis with initial viewport' ,
121
120
subtitle: 'Initial viewport is set to a subset of the data' ,
122
- childBuilder: () => new NumericInitialViewport .withRandomData (),
121
+ childBuilder: () => NumericInitialViewport .withRandomData (),
123
122
),
124
- new GalleryScaffold (
125
- listTileIcon: new Icon (Icons .show_chart),
123
+ GalleryScaffold (
124
+ listTileIcon: const Icon (Icons .show_chart),
126
125
title: 'Gridline dash pattern' ,
127
126
subtitle: 'Timeseries with measure gridlines that have a dash pattern' ,
128
- childBuilder: () => new GridlineDashPattern .withRandomData (),
127
+ childBuilder: () => GridlineDashPattern .withRandomData (),
129
128
),
130
- new GalleryScaffold (
131
- listTileIcon: new Icon (Icons .show_chart),
129
+ GalleryScaffold (
130
+ listTileIcon: const Icon (Icons .show_chart),
132
131
title: 'Disjoint Measure Axes' ,
133
132
subtitle: 'Line chart with disjoint measure axes' ,
134
- childBuilder: () => new DisjointMeasureAxisLineChart .withRandomData (),
133
+ childBuilder: () => DisjointMeasureAxisLineChart .withRandomData (),
135
134
),
136
135
];
137
136
}
0 commit comments