Skip to content

Commit

Permalink
chore: replace deprecated MaterialStatePropertyAll
Browse files Browse the repository at this point in the history
`MaterialStatePropertyAll` is deprecated and shouldn't be used. Use WidgetStatePropertyAll instead. Moved to the Widgets layer to make code available outside of Material. This feature was deprecated after v3.19.0-0.3.pre.
  • Loading branch information
itsezlife committed May 21, 2024
1 parent dd5fd84 commit f9299b2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,13 +338,12 @@ class OrderDetailsGenericError extends StatelessWidget {
),
ElevatedButton(
style: ButtonStyle(
shape: MaterialStatePropertyAll(
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(kDefaultBorderRadius + 6),
),
),
backgroundColor:
MaterialStatePropertyAll(kPrimaryBackgroundColor),
backgroundColor: WidgetStatePropertyAll(kPrimaryBackgroundColor),
),
onPressed: tryAgain,
child: const KText(
Expand Down Expand Up @@ -376,13 +375,12 @@ class OrderDetailsNotFoundError extends StatelessWidget {
),
ElevatedButton(
style: ButtonStyle(
shape: MaterialStatePropertyAll(
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(kDefaultBorderRadius + 6),
),
),
backgroundColor:
MaterialStatePropertyAll(kPrimaryBackgroundColor),
backgroundColor: WidgetStatePropertyAll(kPrimaryBackgroundColor),
),
onPressed: () => context.pop(),
child: const KText(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ class OrdersEmptyList extends StatelessWidget {
),
ElevatedButton(
style: ButtonStyle(
shape: MaterialStatePropertyAll(
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(kDefaultBorderRadius + 6),
),
),
backgroundColor:
MaterialStatePropertyAll(kPrimaryBackgroundColor),
WidgetStatePropertyAll(kPrimaryBackgroundColor),
),
onPressed: () => context.navigateToMainPage(),
child: const KText(
Expand Down Expand Up @@ -172,14 +172,14 @@ class OrdersGenericError extends StatelessWidget {
),
ElevatedButton(
style: ButtonStyle(
shape: MaterialStatePropertyAll(
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(kDefaultBorderRadius + 6),
),
),
backgroundColor:
MaterialStatePropertyAll(kPrimaryBackgroundColor),
WidgetStatePropertyAll(kPrimaryBackgroundColor),
),
onPressed: tryAgain,
child: const KText(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/views/pages/main/components/main_page_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class MainPageErrorView extends StatelessWidget {
),
ElevatedButton.icon(
style: ButtonStyle(
backgroundColor: MaterialStatePropertyAll<Color>(
backgroundColor: WidgetStatePropertyAll<Color>(
kPrimaryBackgroundColor,
),
),
Expand Down

0 comments on commit f9299b2

Please sign in to comment.