added default theme

This commit is contained in:
2025-01-29 14:57:46 +01:00
parent 0567bc61f6
commit 3bc325763a
3 changed files with 41 additions and 5 deletions

View File

@@ -48,12 +48,14 @@ class ReadingGraph extends StatelessWidget {
),
lineTouchData: LineTouchData(
touchTooltipData: LineTouchTooltipData(
getTooltipColor: (touchedSpot) =>
Theme.of(context).colorScheme.primaryContainer,
getTooltipItems: (touchedSpots) {
return touchedSpots.map((touchedSpot) {
return LineTooltipItem(
'${touchedSpot.y.toString()}\n${_getLongDate(touchedSpot.x)}',
TextStyle(
color: Theme.of(context).colorScheme.onPrimary,
color: Theme.of(context).colorScheme.onPrimaryContainer,
fontWeight: FontWeight.bold));
}).toList();
},