Skip to content

Commit 030e01f

Browse files
committed
Return to using ColorScheme.surfaceVariant
While `surfaceVariant` has been deprecated in favor of `surfaceContainerHighest`, the `dynamic_color` package does not yet support it, leading to an incorrect palette. Ignoring the deprecation warnings while waiting for material-foundation/flutter-packages#599.
1 parent c03e09b commit 030e01f

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/screens/search_options/radical_search_screen.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// ignore_for_file: deprecated_member_use
2+
13
import "package:collection/collection.dart";
24
import "package:flutter/material.dart";
35
import "package:jsdict/jp_text.dart";
@@ -107,7 +109,7 @@ class _RadicalSelection extends StatelessWidget {
107109
Widget build(BuildContext context) {
108110
final strokeIndicatorColor = Theme.of(context).highlightColor;
109111
final textColor = Theme.of(context).textTheme.bodyLarge!.color;
110-
final selectedColor = Theme.of(context).colorScheme.surfaceContainerHighest;
112+
final selectedColor = Theme.of(context).colorScheme.surfaceVariant;
111113
final disabledColor = Theme.of(context).focusColor;
112114

113115
return SingleChildScrollView(
@@ -172,8 +174,7 @@ class _KanjiSelection extends StatelessWidget {
172174
@override
173175
Widget build(BuildContext context) {
174176
final textColor = Theme.of(context).textTheme.bodyLarge!.color;
175-
final backgroundColor =
176-
Theme.of(context).colorScheme.surfaceContainerHighest;
177+
final backgroundColor = Theme.of(context).colorScheme.surfaceVariant;
177178

178179
return matchingKanji.isEmpty
179180
? const Center(child: Text("Select radicals"))

0 commit comments

Comments
 (0)