Skip to content

Commit 8184194

Browse files
committed
Add weather icons to daily view
1 parent 3d23fa1 commit 8184194

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/src/weather/view/hourly_line_chart.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class _HourlyLineChartState extends State<HourlyLineChart> {
7171
)
7272
: SingleChildScrollView(
7373
controller: _scrollController,
74-
padding: EdgeInsets.only(top: mq.size.height / 3),
74+
padding:
75+
EdgeInsets.only(top: (mq.size.height / 2.8) + 20),
7576
scrollDirection: Axis.horizontal,
7677
child: SizedBox(
7778
width: forecast.length * 100,
@@ -150,6 +151,10 @@ class _HourlyLineChartState extends State<HourlyLineChart> {
150151
fontSize: 10,
151152
),
152153
),
154+
Padding(
155+
padding: const EdgeInsets.only(top: 5.0),
156+
child: Icon(forecast[value.toInt()].icon),
157+
),
153158
],
154159
),
155160
);
@@ -194,7 +199,7 @@ class _HourlyLineChartState extends State<HourlyLineChart> {
194199
bottomTitles: AxisTitles(
195200
sideTitles: SideTitles(
196201
showTitles: true,
197-
reservedSize: 55,
202+
reservedSize: 85,
198203
interval: 1,
199204
getTitlesWidget: (value, meta) => bottomTitleWidgets(
200205
value: value,

0 commit comments

Comments
 (0)