Skip to content

Commit

Permalink
Return to using ColorScheme.surfaceVariant
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petlyh committed Sep 24, 2024
1 parent c03e09b commit 030e01f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/screens/search_options/radical_search_screen.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: deprecated_member_use

import "package:collection/collection.dart";
import "package:flutter/material.dart";
import "package:jsdict/jp_text.dart";
Expand Down Expand Up @@ -107,7 +109,7 @@ class _RadicalSelection extends StatelessWidget {
Widget build(BuildContext context) {
final strokeIndicatorColor = Theme.of(context).highlightColor;
final textColor = Theme.of(context).textTheme.bodyLarge!.color;
final selectedColor = Theme.of(context).colorScheme.surfaceContainerHighest;
final selectedColor = Theme.of(context).colorScheme.surfaceVariant;
final disabledColor = Theme.of(context).focusColor;

return SingleChildScrollView(
Expand Down Expand Up @@ -172,8 +174,7 @@ class _KanjiSelection extends StatelessWidget {
@override
Widget build(BuildContext context) {
final textColor = Theme.of(context).textTheme.bodyLarge!.color;
final backgroundColor =
Theme.of(context).colorScheme.surfaceContainerHighest;
final backgroundColor = Theme.of(context).colorScheme.surfaceVariant;

return matchingKanji.isEmpty
? const Center(child: Text("Select radicals"))
Expand Down

0 comments on commit 030e01f

Please sign in to comment.