import 'package:comwell_key_app/themes/light_theme.dart';
import 'package:comwell_key_app/utils/l10n_utils.dart';
import 'package:flutter/material.dart';
class ConfirmCheckOutDialog extends StatelessWidget {
final VoidCallback onConfirm;
const ConfirmCheckOutDialog({super.key, required this.onConfirm});
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Dialog(
backgroundColor: Colors.white,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
context.strings.checkout_page_payment_dialog_title,
textAlign: TextAlign.center,
),
const SizedBox(height: 12),
Text(
context.strings.checkout_page_payment_dialog_subtitle,
textAlign: TextAlign.center,
style: theme.textTheme.bodySmall?.copyWith(color: colorBlack[65]),
),
const SizedBox(height: 32),
Row(
children: [
Expanded(
child: ElevatedButton(
onPressed: onConfirm,
style: ButtonStyle(
backgroundColor: WidgetStatePropertyAll(sandColor[100]),
foregroundColor: const WidgetStatePropertyAll(Colors.white),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 17.0),
child: Text(
context.strings.checkout_page_payment_dialog_confirm,
style: theme.textTheme.bodyMedium?.copyWith(color: Colors.white),
),
),
),
),
],
),
const SizedBox(height: 8),
Row(
children: [
Expanded(
child: OutlinedButton(
onPressed: () {
Navigator.of(context).pop();
},
style: const ButtonStyle(
side: WidgetStatePropertyAll(BorderSide(color: colorDivider)),
backgroundColor: WidgetStatePropertyAll(Colors.white),
),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 17.0),
child: Text(
context.strings.checkout_page_payment_dialog_cancel,
style: theme.textTheme.bodyMedium,
),
),
),
),
],
),
],
),
),
);
}
}