diff --git a/lib/screens/wakatime_screen.dart b/lib/screens/wakatime_screen.dart index 6280af6..1ad7364 100644 --- a/lib/screens/wakatime_screen.dart +++ b/lib/screens/wakatime_screen.dart @@ -472,7 +472,21 @@ class _WakatimeScreenState extends State '每日编码时间', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), ), - const SizedBox(height: 16), + SizedBox( + height: 40, + child: Center( + child: _touchedDayIndex != null + ? Text( + '${_formatDate(DateTime.parse(dailyData[_touchedDayIndex!].range.date))}: ${_formatDuration(dailyData[_touchedDayIndex!].grandTotal.totalSeconds.toInt())}', + style: const TextStyle( + fontSize: 16, + fontWeight: FontWeight.bold, + ), + ) + : null, + ), + ), + // const SizedBox(height: 16), SizedBox( height: 200, child: BarChart( @@ -571,18 +585,6 @@ class _WakatimeScreenState extends State ), ), ), - if (_touchedDayIndex != null) ...[ - const SizedBox(height: 16), - Center( - child: Text( - '${_formatDate(DateTime.parse(dailyData[_touchedDayIndex!].range.date))}: ${_formatDuration(dailyData[_touchedDayIndex!].grandTotal.totalSeconds.toInt())}', - style: const TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - ), - ), - ), - ], ], ); }