72 lines
2.2 KiB
Dart
72 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:Tripz/constant/colors.dart';
|
|
import 'package:Tripz/constant/style.dart';
|
|
import 'package:Tripz/controller/payment/payment_controller.dart';
|
|
|
|
import '../../../constant/box_name.dart';
|
|
import '../../../main.dart';
|
|
import '../my_wallet/passenger_wallet.dart';
|
|
|
|
class PointsCaptain extends StatelessWidget {
|
|
PaymentController paymentController = Get.put(PaymentController());
|
|
|
|
PointsCaptain({
|
|
super.key,
|
|
required this.kolor,
|
|
required this.countPoint,
|
|
required this.pricePoint,
|
|
});
|
|
final Color kolor;
|
|
final String countPoint;
|
|
double pricePoint;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(
|
|
onTap: () async {
|
|
Get.to(() => const PassengerWallet());
|
|
paymentController.changePromoSheetDialogue();
|
|
},
|
|
child: Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 3, vertical: 8),
|
|
child: Container(
|
|
width: Get.width * .21,
|
|
height: Get.width * .29,
|
|
margin: const EdgeInsets.all(4),
|
|
decoration: BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [
|
|
kolor.withOpacity(0.3),
|
|
kolor,
|
|
kolor.withOpacity(0.7),
|
|
kolor,
|
|
],
|
|
begin: Alignment.topLeft,
|
|
end: Alignment.bottomRight,
|
|
),
|
|
border: Border.all(color: AppColor.accentColor),
|
|
borderRadius: BorderRadius.circular(12),
|
|
shape: BoxShape.rectangle,
|
|
),
|
|
child: Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Text(
|
|
'$countPoint ${'LE'.tr}',
|
|
style: AppStyle.subtitle,
|
|
),
|
|
Text(
|
|
'$pricePoint ${box.read(BoxName.countryCode) == 'Jordan' ? 'JOD'.tr : 'LE'.tr}',
|
|
style: AppStyle.title,
|
|
textAlign: TextAlign.center,
|
|
),
|
|
],
|
|
),
|
|
)),
|
|
),
|
|
);
|
|
}
|
|
}
|