Chart background on dark theme

This commit is contained in:
2026-04-22 01:04:04 -03:00
parent 3758e06fde
commit 28fc4b70a5
6 changed files with 216 additions and 51 deletions

View File

@@ -58,6 +58,25 @@ class Toolbar extends StatelessWidget {
icon: const Icon(Icons.fit_screen),
label: const Text('Reset view'),
),
const SizedBox(width: 6),
ValueListenableBuilder<bool>(
valueListenable: scope.session.cursorEnabled,
builder: (_, on, __) {
final scheme = Theme.of(context).colorScheme;
return OutlinedButton.icon(
onPressed: () =>
scope.session.cursorEnabled.value = !on,
icon: const Icon(Icons.my_location),
label: const Text('Cursor'),
style: on
? OutlinedButton.styleFrom(
backgroundColor: scheme.primaryContainer,
foregroundColor: scheme.onPrimaryContainer,
)
: null,
);
},
),
const _Sep(),
OutlinedButton.icon(
onPressed: () => showDialog<void>(