upgrade: new version syntax

This commit is contained in:
guozhigq
2024-06-08 13:29:36 +08:00
parent 872a873d68
commit 2fbd1045db
28 changed files with 52 additions and 56 deletions

View File

@ -278,8 +278,8 @@ class DefaultUser extends StatelessWidget {
height: 38,
child: IconButton(
style: ButtonStyle(
padding: MaterialStateProperty.all(EdgeInsets.zero),
backgroundColor: MaterialStateProperty.resolveWith((states) {
padding: WidgetStateProperty.all(EdgeInsets.zero),
backgroundColor: WidgetStateProperty.resolveWith((states) {
return Theme.of(context).colorScheme.onInverseSurface;
}),
),
@ -371,8 +371,8 @@ class CustomChip extends StatelessWidget {
),
backgroundColor: secondaryContainer,
selectedColor: secondaryContainer,
color: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) => secondaryContainer.withAlpha(200)),
color: WidgetStateProperty.resolveWith<Color>(
(Set<WidgetState> states) => secondaryContainer.withAlpha(200)),
padding: const EdgeInsets.fromLTRB(7, 1, 7, 1),
label: Text(label, style: chipTextStyle),
onPressed: () => onTap(),