86 lines
2.4 KiB
Dart
86 lines
2.4 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class PaymentOption extends StatelessWidget {
|
|
final String title;
|
|
final String subtitle;
|
|
final bool isSelected;
|
|
final VoidCallback onTap;
|
|
|
|
const PaymentOption({
|
|
required this.title,
|
|
required this.subtitle,
|
|
required this.isSelected,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onTap,
|
|
child: Container(
|
|
height: 56,
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
decoration: BoxDecoration(
|
|
color: const Color(0x00000032).withOpacity(1),
|
|
borderRadius: BorderRadius.circular(24),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Expanded(
|
|
child: Row(
|
|
children: [
|
|
Text(
|
|
title,
|
|
style: const TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
const SizedBox(width: 6),
|
|
Text(
|
|
subtitle,
|
|
style: TextStyle(
|
|
color: Colors.white.withOpacity(0.6),
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
// 🔹 РАДИО-КНОПКА
|
|
Container(
|
|
width: 20,
|
|
height: 20,
|
|
decoration: BoxDecoration(
|
|
shape: BoxShape.circle,
|
|
border: Border.all(
|
|
color: isSelected
|
|
? const Color(0xFF66E3C4)
|
|
: Colors.white.withOpacity(0.4),
|
|
width: 2,
|
|
),
|
|
),
|
|
child: isSelected
|
|
? const Center(
|
|
child: SizedBox(
|
|
width: 10,
|
|
height: 10,
|
|
child: DecoratedBox(
|
|
decoration: BoxDecoration(
|
|
color: Color(0xFF66E3C4),
|
|
shape: BoxShape.circle,
|
|
),
|
|
),
|
|
),
|
|
)
|
|
: null,
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |