upgrade: new version syntax

This commit is contained in:
guozhigq
2024-06-08 13:29:36 +08:00
parent 57b8ebfa6f
commit f4b7f77e44
28 changed files with 52 additions and 56 deletions

View File

@ -27,8 +27,8 @@ class ToolbarIconButton extends StatelessWidget {
? Theme.of(context).colorScheme.onSecondaryContainer
: Theme.of(context).colorScheme.outline,
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
backgroundColor: MaterialStateProperty.resolveWith((states) {
padding: WidgetStateProperty.all(EdgeInsets.zero),
backgroundColor: WidgetStateProperty.resolveWith((states) {
return selected
? Theme.of(context).colorScheme.secondaryContainer
: null;

View File

@ -259,7 +259,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
size: 22),
label: const Text('转发到动态'),
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all(
foregroundColor: WidgetStateProperty.all(
isForward.value
? Theme.of(context).colorScheme.primary
: Theme.of(context).colorScheme.outline,