96 lines
3.4 KiB
Dart
96 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CancelBookingDialog extends StatelessWidget {
|
|
const CancelBookingDialog({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Dialog(
|
|
backgroundColor: Colors.transparent,
|
|
insetPadding: const EdgeInsets.symmetric(horizontal: 40),
|
|
child: Container(
|
|
padding: const EdgeInsets.all(24),
|
|
decoration: BoxDecoration(
|
|
color: const Color(0xFF2E3253).withOpacity(0.95),
|
|
borderRadius: BorderRadius.circular(28),
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
const Text(
|
|
"Отменить\nбронирование?",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 22,
|
|
fontWeight: FontWeight.w600,
|
|
height: 1.2,
|
|
),
|
|
),
|
|
const SizedBox(height: 16),
|
|
const Text(
|
|
"Вы действительно хотите отменить\nбронирование",
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white70,
|
|
fontSize: 14,
|
|
height: 1.4,
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
|
|
// 🔹 Кнопка "Отменить" — ПЕРВАЯ, зелёная (градиент), возвращает true
|
|
Container(
|
|
width: double.infinity,
|
|
height: 52,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(26),
|
|
gradient: const LinearGradient(
|
|
colors: [Color(0xFF8EFEB5), Color(0xFF86FEF1)],
|
|
),
|
|
),
|
|
child: ElevatedButton(
|
|
onPressed: () => Navigator.pop(context, true), // ✅ true = отменить
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: Colors.transparent,
|
|
shadowColor: Colors.transparent,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(26),
|
|
),
|
|
),
|
|
child: const Text(
|
|
"Отменить",
|
|
style: TextStyle(
|
|
color: Color(0xFF1D273A), // тёмный текст на светлом градиенте
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(height: 12),
|
|
|
|
// 🔹 Кнопка "Оставить" — ВТОРАЯ, тёмная, возвращает false
|
|
SizedBox(
|
|
width: double.infinity,
|
|
height: 52,
|
|
child: ElevatedButton(
|
|
onPressed: () => Navigator.pop(context, false), // ❌ false = оставить
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: const Color(0xFF0D1024),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(26),
|
|
),
|
|
),
|
|
child: const Text(
|
|
"Оставить",
|
|
style: TextStyle(color: Colors.white, fontSize: 16),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |