refactor: Migrate deprecated member

This commit is contained in:
validcube
2024-07-13 17:32:34 +07:00
parent e9cee0abe2
commit c6f9e36f4b
5 changed files with 23 additions and 27 deletions

View File

@ -170,7 +170,7 @@ class _PatchItemState extends State<PatchItem> {
onPressed: () =>
_showUnsupportedWarningDialog(),
style: ButtonStyle(
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8),
@ -181,12 +181,10 @@ class _PatchItemState extends State<PatchItem> {
),
),
),
backgroundColor:
MaterialStateProperty.all(
backgroundColor: WidgetStateProperty.all(
Colors.transparent,
),
foregroundColor:
MaterialStateProperty.all(
foregroundColor: WidgetStateProperty.all(
Theme.of(context).colorScheme.secondary,
),
),

View File

@ -38,8 +38,8 @@ class CustomSliverAppBar extends StatelessWidget {
onPressed:
onBackButtonPressed ?? () => Navigator.of(context).pop(),
),
backgroundColor: MaterialStateColor.resolveWith(
(states) => states.contains(MaterialState.scrolledUnder)
backgroundColor: WidgetStateColor.resolveWith(
(states) => states.contains(WidgetState.scrolledUnder)
? Theme.of(context).colorScheme.surface
: Theme.of(context).canvasColor,
),