Skip to content

Commit

Permalink
Removed use of WidgetStateProperty for ElevatedButton.styleFrom appro…
Browse files Browse the repository at this point in the history
…ach.
  • Loading branch information
pedroafmonteiro committed Jan 2, 2025
1 parent 330e0d6 commit 90f185b
Showing 1 changed file with 14 additions and 25 deletions.
39 changes: 14 additions & 25 deletions packages/uni_app/lib/view/login/login.dart
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ class LoginPageViewState extends State<LoginPageView>
});
if (mounted) {
Logger().e(S.of(context).failed_to_authenticate);
unawaited(ToastMessage.error(context, S.of(context).failed_to_authenticate));
unawaited(
ToastMessage.error(context, S.of(context).failed_to_authenticate));
}
}
}
Expand Down Expand Up @@ -430,18 +431,12 @@ class LoginPageViewState extends State<LoginPageView>
),
actions: <Widget>[
ElevatedButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(const Color(0xFF3C0A0E)),
foregroundColor:
WidgetStateProperty.all(const Color(0xFFFFF5F3)),
side: WidgetStateProperty.all(
const BorderSide(color: Color(0xFF56272B)),
),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF3C0A0E),
foregroundColor: const Color(0xFFFFF5F3),
side: const BorderSide(color: Color(0xFF56272B)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
onPressed: () {
Expand All @@ -451,18 +446,12 @@ class LoginPageViewState extends State<LoginPageView>
),
const SizedBox(width: 6),
ElevatedButton(
style: ButtonStyle(
backgroundColor:
WidgetStateProperty.all(const Color(0xFF3C0A0E)),
foregroundColor:
WidgetStateProperty.all(const Color(0xFFFFF5F3)),
side: WidgetStateProperty.all(
const BorderSide(color: Color(0xFF56272B)),
),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF3C0A0E),
foregroundColor: const Color(0xFFFFF5F3),
side: const BorderSide(color: Color(0xFF56272B)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
onPressed: () {
Expand Down

0 comments on commit 90f185b

Please sign in to comment.