proxybuy-flutter/lib/widgets/price_reserve_widget.dart

116 lines
3.9 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lba/res/colors.dart';
import 'package:lba/widgets/reserve_bottom_sheet.dart';
class PriceReserveWidget extends StatelessWidget {
const PriceReserveWidget({super.key});
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 12),
decoration: const BoxDecoration(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// بخش قیمت
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Row(
children: [
Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 3),
decoration: BoxDecoration(
color: LightAppColors.offerTimer,
borderRadius: BorderRadius.circular(4),
),
child: const Text(
'HOT',
style: TextStyle(
color: Colors.white,
fontSize: 11,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(width: 8),
Row(
children: const [
Text(
'2126.88',
style: TextStyle(
fontSize: 14,
color: Colors.grey,
decoration: TextDecoration.lineThrough,
),
),
SizedBox(width: 5),
Text(
'(12%)',
style: TextStyle(
fontSize: 14,
color: LightAppColors.offerTimer,
),
),
],
),
],
),
const SizedBox(height: 6),
const FittedBox(
fit: BoxFit.scaleDown,
child: Text(
'AED 1,899',
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: LightAppColors.offerTimer,
),
maxLines: 1,
),
),
],
),
),
const SizedBox(width: 16),
SizedBox(
width: 200,
height: 50,
child: ElevatedButton(
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (context) => const ReserveBottomSheet(),
);
},
style: ElevatedButton.styleFrom(
backgroundColor: LightAppColors.offerTimer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
),
child: const Text(
'Reserve',
style: TextStyle(
color: Colors.white,
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
);
}
}