diff --git a/lib/widgets/dialog_widgets/push_request_dialog.dart b/lib/widgets/dialog_widgets/push_request_dialog.dart index 9a068f693..e74700a8c 100644 --- a/lib/widgets/dialog_widgets/push_request_dialog.dart +++ b/lib/widgets/dialog_widgets/push_request_dialog.dart @@ -127,7 +127,7 @@ class _PushRequestDialogState extends ConsumerState { return; } ref.read(pushRequestProvider.notifier).accept(token, widget.pushRequest).then((success) { - Logger.info('accept push request success: $success', name: 'push_request_dialog.dart#AnswerSelectionWidget'); + Logger.info('accept push request success: $success', name: 'push_request_dialog.dart#_PushRequestDialogState'); if (!success && mounted) setState(() => isHandled = false); }); if (mounted) setState(() => isHandled = true); @@ -196,6 +196,7 @@ class _PushRequestDialogState extends ConsumerState { Future _showConfirmationDialog(PushToken pushToken) { final localizations = AppLocalizations.of(context)!; + final pushRequestTheme = (Theme.of(context).extensions[PushRequestTheme] as PushRequestTheme); return showDialog( useRootNavigator: false, context: globalNavigatorKey.currentContext!, @@ -225,7 +226,10 @@ class _PushRequestDialogState extends ConsumerState { Expanded( flex: 6, child: PressButton( - style: ButtonStyle(shape: buttonShape(context)), + style: ButtonStyle( + shape: buttonShape(context), + backgroundColor: WidgetStateProperty.all(pushRequestTheme.acceptColor), + ), onPressed: () async { if (pushToken.isLocked && await lockAuth(localizedReason: localizations.authToDeclinePushRequest) == false) { return; @@ -266,7 +270,7 @@ class _PushRequestDialogState extends ConsumerState { flex: 6, child: PressButton( style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(Theme.of(context).colorScheme.errorContainer), + backgroundColor: WidgetStateProperty.all(pushRequestTheme.declineColor), shape: buttonShape(context), ), onPressed: () async { @@ -336,6 +340,7 @@ class _AnswerSelectionWidgetState extends State> { final spacer = (maxThisRow != numPerRow && totalAnswersNum > maxThisRow) ? Expanded(flex: (numPerRow - answersThisRow.length) * answersThisRow.length, child: const SizedBox()) : const SizedBox(); + final pushRequestTheme = (Theme.of(context).extensions[PushRequestTheme] as PushRequestTheme); children.add( Row( mainAxisSize: MainAxisSize.max, @@ -346,7 +351,10 @@ class _AnswerSelectionWidgetState extends State> { Expanded( flex: answersThisRow.length * 2, child: PressButton( - style: ButtonStyle(shape: _PushRequestDialogState.buttonShape(context)), + style: ButtonStyle( + shape: _PushRequestDialogState.buttonShape(context), + backgroundColor: WidgetStateProperty.all(pushRequestTheme.acceptColor), + ), onPressed: () => widget.onAnswerSelected(possibleAnswer), child: Padding( padding: EdgeInsets.symmetric(vertical: spacerHeight),